.github
.storybook
scripts
build-storybook.ts
build.ts
copyKeycloakResourcesToStorybookStaticDir.ts
dump-keycloak-realm.ts
generate-i18n-messages.ts
grant-exec-perms.ts
link-in-app.ts
link-in-starter.ts
start-storybook.ts
startRebuildOnSrcChange.ts
src
stories
test
.all-contributorsrc
.gitattributes
.gitignore
.prettierignore
.prettierrc.json
CONTRIBUTING.md
LICENSE
README.md
package.json
renovate.json
tsproject.json
vitest.config.ts
yarn.lock
20 lines
674 B
TypeScript
20 lines
674 B
TypeScript
import { join as pathJoin } from "path";
|
|
import { constants } from "fs";
|
|
import { chmod, stat } from "fs/promises";
|
|
|
|
(async () => {
|
|
const thisCodebaseRootDirPath = pathJoin(__dirname, "..");
|
|
|
|
const { bin } = await import(pathJoin(thisCodebaseRootDirPath, "package.json"));
|
|
|
|
const promises = Object.values<string>(bin).map(async scriptPath => {
|
|
const fullPath = pathJoin(thisCodebaseRootDirPath, scriptPath);
|
|
const oldMode = (await stat(fullPath)).mode;
|
|
const newMode =
|
|
oldMode | constants.S_IXUSR | constants.S_IXGRP | constants.S_IXOTH;
|
|
await chmod(fullPath, newMode);
|
|
});
|
|
|
|
await Promise.all(promises);
|
|
})();
|