@quadnix/octo-build 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create-anchor/create-anchor.command.d.ts +13 -0
- package/dist/commands/create-anchor/create-anchor.command.js +67 -0
- package/dist/commands/create-anchor/create-anchor.command.js.map +1 -0
- package/dist/commands/create-anchor/generator-octo-anchor-template/generators/app/index.d.ts +13 -0
- package/dist/commands/create-anchor/generator-octo-anchor-template/generators/app/index.js +59 -0
- package/dist/commands/create-anchor/generator-octo-anchor-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-anchor/generator-octo-anchor-template/generators/app/templates/anchors/anchor/anchor.schema.ts.ejs +23 -0
- package/dist/commands/create-anchor/generator-octo-anchor-template/generators/app/templates/anchors/anchor/anchor.ts.ejs +15 -0
- package/dist/commands/create-anchor/index.d.ts +1 -0
- package/dist/commands/create-anchor/index.js +2 -0
- package/dist/commands/create-anchor/index.js.map +1 -0
- package/dist/commands/{create/create.command.d.ts → create-app/create-app.command.d.ts} +1 -1
- package/dist/commands/{create/create.command.js → create-app/create-app.command.js} +3 -3
- package/dist/commands/create-app/create-app.command.js.map +1 -0
- package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/index.d.ts +0 -1
- package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/index.js +18 -29
- package/dist/commands/create-app/generator-octo-app-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/README.md.ejs +58 -0
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/eslint.config.js.ejs +118 -0
- package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/package.json.ejs +1 -4
- package/dist/commands/{create/generator-octo-app-template/generators/app/templates/src/aws-s3-website → create-app/generator-octo-app-template/generators/app/templates/src/aws-ecs-server}/main.ts.ejs +3 -3
- package/dist/commands/{create/generator-octo-app-template/generators/app/templates/src/aws-ecs-server → create-app/generator-octo-app-template/generators/app/templates/src/aws-s3-website}/main.ts.ejs +3 -3
- package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-s3-website/module-definitions.ts.ejs +1 -1
- package/dist/commands/create-app/index.d.ts +1 -0
- package/dist/commands/create-app/index.js +2 -0
- package/dist/commands/create-app/index.js.map +1 -0
- package/dist/commands/create-cdk/create-cdk.command.d.ts +11 -0
- package/dist/commands/create-cdk/create-cdk.command.js +70 -0
- package/dist/commands/create-cdk/create-cdk.command.js.map +1 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/index.d.ts +10 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/index.js +107 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/README.md.ejs +23 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/eslint.config.js.ejs +337 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/gitignore.ejs +82 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/package.json.ejs +57 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/prettierrc.ejs +5 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/anchors/app/app.anchor.schema.ts.ejs +19 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/anchors/app/app.anchor.ts.ejs +17 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/factories/dummy-credentials.factory.ts.ejs +28 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/dummy-app.module.spec.ts.ejs +90 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/dummy-app.module.ts.ejs +16 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/index.schema.ts.ejs +10 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/index.ts.ejs +3 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/models/app/actions/add-dummy-app.model.action.ts.ejs +59 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/modules/app/dummy-app/models/app/index.ts.ejs +1 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/resources/http-fetch/actions/add-http-fetch.resource.action.ts.ejs +55 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/resources/http-fetch/http-fetch.resource.ts.ejs +12 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/resources/http-fetch/index.schema.ts.ejs +35 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/resources/http-fetch/index.ts.ejs +3 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/src/utilities/dummy/dummy.utility.ts.ejs +11 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/tsconfig.build.json.ejs +11 -0
- package/dist/commands/create-cdk/generator-octo-cdk-template/generators/app/templates/tsconfig.json.ejs +39 -0
- package/dist/commands/create-cdk/index.d.ts +1 -0
- package/dist/commands/create-cdk/index.js +2 -0
- package/dist/commands/create-cdk/index.js.map +1 -0
- package/dist/commands/create-model/create-model.command.d.ts +12 -0
- package/dist/commands/create-model/create-model.command.js +62 -0
- package/dist/commands/create-model/create-model.command.js.map +1 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/index.d.ts +11 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/index.js +68 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/actions/add.model.action.ts.ejs +50 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/index.ts.ejs +3 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/model.ts.ejs +29 -0
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/schema.ts.ejs +8 -0
- package/dist/commands/create-model/index.d.ts +1 -0
- package/dist/commands/create-model/index.js +2 -0
- package/dist/commands/create-model/index.js.map +1 -0
- package/dist/commands/create-module/create-module.command.d.ts +12 -0
- package/dist/commands/create-module/create-module.command.js +62 -0
- package/dist/commands/create-module/create-module.command.js.map +1 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/index.d.ts +11 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/index.js +60 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/templates/index.schema.ts.ejs +3 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/templates/index.ts.ejs +1 -0
- package/dist/commands/create-module/generator-octo-module-template/generators/app/templates/module.ts.ejs +9 -0
- package/dist/commands/create-module/index.d.ts +1 -0
- package/dist/commands/create-module/index.js +2 -0
- package/dist/commands/create-module/index.js.map +1 -0
- package/dist/commands/create-overlay/create-overlay.command.d.ts +13 -0
- package/dist/commands/create-overlay/create-overlay.command.js +67 -0
- package/dist/commands/create-overlay/create-overlay.command.js.map +1 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/index.d.ts +12 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/index.js +72 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/templates/overlays/overlay/actions/add.overlay.action.ts.ejs +50 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/templates/overlays/overlay/index.ts.ejs +3 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/templates/overlays/overlay/overlay.schema.ts.ejs +13 -0
- package/dist/commands/create-overlay/generator-octo-overlay-template/generators/app/templates/overlays/overlay/overlay.ts.ejs +22 -0
- package/dist/commands/create-overlay/index.d.ts +1 -0
- package/dist/commands/create-overlay/index.js +2 -0
- package/dist/commands/create-overlay/index.js.map +1 -0
- package/dist/commands/create-resource/create-resource.command.d.ts +11 -0
- package/dist/commands/create-resource/create-resource.command.js +55 -0
- package/dist/commands/create-resource/create-resource.command.js.map +1 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.d.ts +10 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.js +71 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.js.map +1 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/actions/add.resource.action.ts.ejs +65 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/actions/delete.resource.action.ts.ejs +58 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/actions/update-tags.resource.action.ts.ejs +95 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/index.schema.ts.ejs +31 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/index.ts.ejs +5 -0
- package/dist/commands/create-resource/generator-octo-resource-template/generators/app/templates/resources/resource/resource.ts.ejs +12 -0
- package/dist/commands/create-resource/index.d.ts +1 -0
- package/dist/commands/create-resource/index.js +2 -0
- package/dist/commands/create-resource/index.js.map +1 -0
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/utilities/string/string.utility.d.ts +5 -0
- package/dist/utilities/string/string.utility.js +26 -0
- package/dist/utilities/string/string.utility.js.map +1 -0
- package/package.json +2 -2
- package/dist/commands/create/create.command.js.map +0 -1
- package/dist/commands/create/generator-octo-app-template/generators/app/index.js.map +0 -1
- package/dist/commands/create/generator-octo-app-template/generators/app/templates/README.md.ejs +0 -84
- package/dist/commands/create/generator-octo-app-template/generators/app/templates/eslint.config.js.ejs +0 -130
- package/dist/commands/create/index.d.ts +0 -1
- package/dist/commands/create/index.js +0 -2
- package/dist/commands/create/index.js.map +0 -1
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/gitignore.ejs +0 -0
- /package/dist/commands/{create/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/octo → create-app/generator-octo-app-template/generators/app/templates}/gitkeep.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/prettierrc.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/app.config.ts.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/env.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/module-definitions.ts.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-s3-website/app.config.ts.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-s3-website/env.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-s3-website/website/error.html.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/src/aws-s3-website/website/index.html.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/tsconfig.build.json.ejs +0 -0
- /package/dist/commands/{create → create-app}/generator-octo-app-template/generators/app/templates/tsconfig.json.ejs +0 -0
- /package/dist/commands/{create/generator-octo-app-template/generators/app/templates/src/aws-s3-website/octo → create-cdk/generator-octo-cdk-template/generators/app/templates}/gitkeep.ejs +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AOverlay, type Diff, Overlay } from '@quadnix/octo';
|
|
2
|
+
import { <%= moduleNamePascal %><%= overlayNamePascal %>OverlaySchema } from './<%= moduleName %>-<%= overlayName %>.schema.js';
|
|
3
|
+
|
|
4
|
+
@Overlay('<%= packageName %>', '<%= moduleName %>-<%= overlayName %>-overlay', <%= moduleNamePascal %><%= overlayNamePascal %>OverlaySchema)
|
|
5
|
+
export class <%= moduleNamePascal %><%= overlayNamePascal %>Overlay extends AOverlay<
|
|
6
|
+
<%= moduleNamePascal %><%= overlayNamePascal %>OverlaySchema,
|
|
7
|
+
<%= moduleNamePascal %><%= overlayNamePascal %>Overlay
|
|
8
|
+
> {
|
|
9
|
+
declare properties: <%= moduleNamePascal %><%= overlayNamePascal %>OverlaySchema['properties'];
|
|
10
|
+
|
|
11
|
+
constructor(
|
|
12
|
+
overlayId: string,
|
|
13
|
+
properties: <%= moduleNamePascal %><%= overlayNamePascal %>OverlaySchema['properties'],
|
|
14
|
+
anchors: [],
|
|
15
|
+
) {
|
|
16
|
+
super(overlayId, properties, anchors);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
override async diffAnchors(): Promise<Diff[]> {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createOverlayCommand } from './create-overlay.command.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/create-overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ArgumentsCamelCase, Argv } from 'yargs';
|
|
2
|
+
export declare const createResourceCommand: {
|
|
3
|
+
builder: (yargs: Argv) => Argv;
|
|
4
|
+
command: string;
|
|
5
|
+
describe: string;
|
|
6
|
+
handler: (argv: ArgumentsCamelCase<{
|
|
7
|
+
name: string;
|
|
8
|
+
package: string;
|
|
9
|
+
path: string;
|
|
10
|
+
}>) => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { dirname, resolve } from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { createEnv } from 'yeoman-environment';
|
|
5
|
+
import { StringUtility } from '../../utilities/string/string.utility.js';
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
export const createResourceCommand = {
|
|
8
|
+
builder: (yargs) => {
|
|
9
|
+
return yargs
|
|
10
|
+
.option('name', {
|
|
11
|
+
alias: 'n',
|
|
12
|
+
demandOption: true,
|
|
13
|
+
description: 'Name of the resource to create. Should be in kebab-case (e.g., my-awesome-resource).',
|
|
14
|
+
type: 'string',
|
|
15
|
+
})
|
|
16
|
+
.option('package', {
|
|
17
|
+
demandOption: true,
|
|
18
|
+
description: 'Package name for the resource.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
})
|
|
21
|
+
.option('path', {
|
|
22
|
+
alias: 'p',
|
|
23
|
+
default: '.',
|
|
24
|
+
description: 'Root directory path of the CDK.',
|
|
25
|
+
type: 'string',
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
command: 'create-resource',
|
|
29
|
+
describe: 'Create a new Octo resource.',
|
|
30
|
+
handler: async (argv) => {
|
|
31
|
+
const { name, package: packageName, path } = argv;
|
|
32
|
+
// Validate resource name format (should be kebab-case)
|
|
33
|
+
if (!StringUtility.isKebabCase(name)) {
|
|
34
|
+
console.error(chalk.red('Resource name must be in kebab-case format (e.g., my-vpc)'));
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
console.log(chalk.blue(`Creating resource "${name}" with package "${packageName}"...`));
|
|
38
|
+
const env = createEnv();
|
|
39
|
+
env.register(resolve(__dirname, 'generator-octo-resource-template/generators/app/index.js'), {
|
|
40
|
+
namespace: 'generator-octo-resource-template:app',
|
|
41
|
+
});
|
|
42
|
+
try {
|
|
43
|
+
await env.run(['generator-octo-resource-template:app', name, packageName, path], {
|
|
44
|
+
skipCache: true,
|
|
45
|
+
skipInstall: true,
|
|
46
|
+
});
|
|
47
|
+
console.log(chalk.green(`Successfully created resource!`));
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
console.error(chalk.red(`Failed to create resource! ${error.message}`));
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=create-resource.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-resource.command.js","sourceRoot":"","sources":["../../../src/commands/create-resource/create-resource.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAEzE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK;aACT,MAAM,CAAC,MAAM,EAAE;YACd,KAAK,EAAE,GAAG;YACV,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,sFAAsF;YACnG,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;YACZ,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,6BAA6B;IACvC,OAAO,EAAE,KAAK,EAAE,IAAyE,EAAiB,EAAE;QAC1G,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAElD,uDAAuD;QACvD,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC,CAAC;YACtF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAsB,IAAI,mBAAmB,WAAW,MAAM,CAAC,CAAC,CAAC;QAExF,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;QACxB,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,0DAA0D,CAAC,EAAE;YAC3F,SAAS,EAAE,sCAAsC;SAClD,CAAC,CAAC;QAEH,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,sCAAsC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE;gBAC/E,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,8BAA8B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Generator, { type BaseOptions } from 'yeoman-generator';
|
|
2
|
+
export default class extends Generator {
|
|
3
|
+
private readonly cdkRootDir;
|
|
4
|
+
private readonly packageName;
|
|
5
|
+
private readonly resourceName;
|
|
6
|
+
constructor(args: string[], opts: BaseOptions);
|
|
7
|
+
initializing(): Promise<void>;
|
|
8
|
+
writing(): Promise<void>;
|
|
9
|
+
end(): void;
|
|
10
|
+
}
|
package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { readdir, stat } from 'fs/promises';
|
|
2
|
+
import { join, resolve } from 'path';
|
|
3
|
+
import Generator, {} from 'yeoman-generator';
|
|
4
|
+
import { StringUtility } from '../../../../../utilities/string/string.utility.js';
|
|
5
|
+
export default class extends Generator {
|
|
6
|
+
constructor(args, opts) {
|
|
7
|
+
super(args, opts);
|
|
8
|
+
this.resourceName = args[0];
|
|
9
|
+
this.packageName = args[1];
|
|
10
|
+
this.cdkRootDir = args[2];
|
|
11
|
+
}
|
|
12
|
+
async initializing() {
|
|
13
|
+
const targetPath = resolve(join(this.cdkRootDir, 'src', 'resources', this.resourceName));
|
|
14
|
+
// Check if directory already exists and is not empty.
|
|
15
|
+
let targetPathStat;
|
|
16
|
+
try {
|
|
17
|
+
targetPathStat = await stat(targetPath);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (error.code !== 'ENOENT') {
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (targetPathStat?.isDirectory()) {
|
|
25
|
+
const files = await readdir(targetPath);
|
|
26
|
+
if (files.length > 0) {
|
|
27
|
+
throw new Error(`Directory '${targetPath}' already exists and is not empty!`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Set the destination root to the resource directory.
|
|
31
|
+
this.destinationRoot(targetPath);
|
|
32
|
+
}
|
|
33
|
+
async writing() {
|
|
34
|
+
// Create the resource file.
|
|
35
|
+
this.fs.copyTpl(this.templatePath('resources/resource/resource.ts.ejs'), this.destinationPath(`${this.resourceName}.resource.ts`), {
|
|
36
|
+
packageName: this.packageName,
|
|
37
|
+
resourceName: this.resourceName,
|
|
38
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
39
|
+
});
|
|
40
|
+
// Create schema file.
|
|
41
|
+
this.fs.copyTpl(this.templatePath('resources/resource/index.schema.ts.ejs'), this.destinationPath('index.schema.ts'), {
|
|
42
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
43
|
+
});
|
|
44
|
+
// Create index.ts
|
|
45
|
+
this.fs.copyTpl(this.templatePath('resources/resource/index.ts.ejs'), this.destinationPath('index.ts'), {
|
|
46
|
+
resourceName: this.resourceName,
|
|
47
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
48
|
+
});
|
|
49
|
+
// Create actions directory and action files
|
|
50
|
+
this.fs.copyTpl(this.templatePath('resources/resource/actions/add.resource.action.ts.ejs'), this.destinationPath('actions', `add-${this.resourceName}.resource.action.ts`), {
|
|
51
|
+
resourceName: this.resourceName,
|
|
52
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
53
|
+
});
|
|
54
|
+
this.fs.copyTpl(this.templatePath('resources/resource/actions/delete.resource.action.ts.ejs'), this.destinationPath('actions', `delete-${this.resourceName}.resource.action.ts`), {
|
|
55
|
+
resourceName: this.resourceName,
|
|
56
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
57
|
+
});
|
|
58
|
+
this.fs.copyTpl(this.templatePath('resources/resource/actions/update-tags.resource.action.ts.ejs'), this.destinationPath('actions', `update-${this.resourceName}-tags.resource.action.ts`), {
|
|
59
|
+
resourceName: this.resourceName,
|
|
60
|
+
resourceNamePascal: StringUtility.toPascalCase(this.resourceName),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
end() {
|
|
64
|
+
const targetPath = resolve(join(this.cdkRootDir, 'src', 'resources', this.resourceName));
|
|
65
|
+
this.log('✅ Your resource has been generated successfully!');
|
|
66
|
+
this.log(`📁 Resource created at: ${targetPath}`);
|
|
67
|
+
this.log('📦 Next steps:');
|
|
68
|
+
this.log(` Address all "Fix me" in generated files`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
package/dist/commands/create-resource/generator-octo-resource-template/generators/app/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/create-resource/generator-octo-resource-template/generators/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,SAAS,EAAE,EAAoB,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAElF,MAAM,CAAC,OAAO,MAAO,SAAQ,SAAS;IAKpC,YAAY,IAAc,EAAE,IAAiB;QAC3C,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAEzF,sDAAsD;QACtD,IAAI,cAAiC,CAAC;QACtC,IAAI,CAAC;YACH,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,CAAC,I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,GAAG,CAAC,4CAA4C,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ANodeAction, Action, type Diff, DiffAction, Factory, type IResourceAction, hasNodeName } from '@quadnix/octo';
|
|
2
|
+
import type { <%= resourceNamePascal %>Schema } from '../index.schema.js';
|
|
3
|
+
import { <%= resourceNamePascal %> } from '../<%= resourceName %>.resource.js';
|
|
4
|
+
|
|
5
|
+
@Action(<%= resourceNamePascal %>)
|
|
6
|
+
export class Add<%= resourceNamePascal %>ResourceAction extends ANodeAction implements IResourceAction<<%= resourceNamePascal %>> {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
filter(diff: Diff): boolean {
|
|
12
|
+
return (
|
|
13
|
+
diff.action === DiffAction.ADD &&
|
|
14
|
+
diff.node instanceof <%= resourceNamePascal %> &&
|
|
15
|
+
hasNodeName(diff.node, '<%= resourceName %>') &&
|
|
16
|
+
diff.field === 'resourceId'
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async handle(diff: Diff<<%= resourceNamePascal %>>): Promise<void> {
|
|
21
|
+
// Get properties.
|
|
22
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
23
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
24
|
+
const response = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.response;
|
|
25
|
+
const tags = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.tags;
|
|
26
|
+
|
|
27
|
+
// Fix me: Implement the add resource logic.
|
|
28
|
+
// This is where you would create the actual resource.
|
|
29
|
+
|
|
30
|
+
// Set response.
|
|
31
|
+
// Fix me: Set response properties.
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async mock(diff: Diff<<%= resourceNamePascal %>>, capture: Partial<<%= resourceNamePascal %>Schema['response']>): Promise<void> {
|
|
35
|
+
// Get properties.
|
|
36
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
37
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
38
|
+
|
|
39
|
+
// Fix me: Implement mock logic for captures.
|
|
40
|
+
// E.g.,
|
|
41
|
+
// const ec2Client = await this.container.get<EC2Client, typeof EC2ClientFactory>(EC2Client, {
|
|
42
|
+
// args: [properties.awsAccountId, properties.awsRegionId],
|
|
43
|
+
// metadata: { package: '@example' },
|
|
44
|
+
// });
|
|
45
|
+
// ec2Client.send = async (instance: unknown): Promise<unknown> => {
|
|
46
|
+
// if (instance instanceof CreateVpcCommand) {
|
|
47
|
+
// return { Vpc: { VpcId: capture.VpcId } };
|
|
48
|
+
// } else if (instance instanceof ModifyVpcAttributeCommand) {
|
|
49
|
+
// return {};
|
|
50
|
+
// }
|
|
51
|
+
// };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@Factory<Add<%= resourceNamePascal %>ResourceAction>(Add<%= resourceNamePascal %>ResourceAction)
|
|
56
|
+
export class Add<%= resourceNamePascal %>ResourceActionFactory {
|
|
57
|
+
private static instance: Add<%= resourceNamePascal %>ResourceAction;
|
|
58
|
+
|
|
59
|
+
static async create(): Promise<Add<%= resourceNamePascal %>ResourceAction> {
|
|
60
|
+
if (!this.instance) {
|
|
61
|
+
this.instance = new Add<%= resourceNamePascal %>ResourceAction();
|
|
62
|
+
}
|
|
63
|
+
return this.instance;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ANodeAction, Action, type Diff, DiffAction, Factory, type IResourceAction, hasNodeName } from '@quadnix/octo';
|
|
2
|
+
import { <%= resourceNamePascal %> } from '../<%= resourceName %>.resource.js';
|
|
3
|
+
|
|
4
|
+
@Action(<%= resourceNamePascal %>)
|
|
5
|
+
export class Delete<%= resourceNamePascal %>ResourceAction extends ANodeAction implements IResourceAction<<%= resourceNamePascal %>> {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
filter(diff: Diff): boolean {
|
|
11
|
+
return (
|
|
12
|
+
diff.action === DiffAction.DELETE &&
|
|
13
|
+
diff.node instanceof <%= resourceNamePascal %> &&
|
|
14
|
+
hasNodeName(diff.node, '<%= resourceName %>') &&
|
|
15
|
+
diff.field === 'resourceId'
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async handle(diff: Diff<<%= resourceNamePascal %>>): Promise<void> {
|
|
20
|
+
// Get properties.
|
|
21
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
22
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
23
|
+
const response = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.response;
|
|
24
|
+
|
|
25
|
+
// Fix me: Implement the delete resource logic.
|
|
26
|
+
// This is where you would delete the actual resource.
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async mock(diff: Diff<<%= resourceNamePascal %>>): Promise<void> {
|
|
30
|
+
// Get properties.
|
|
31
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
32
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
33
|
+
|
|
34
|
+
// Fix me: Implement mock logic for captures.
|
|
35
|
+
// E.g.,
|
|
36
|
+
// const ec2Client = await this.container.get<EC2Client, typeof EC2ClientFactory>(EC2Client, {
|
|
37
|
+
// args: [properties.awsAccountId, properties.awsRegionId],
|
|
38
|
+
// metadata: { package: '@example' },
|
|
39
|
+
// });
|
|
40
|
+
// ec2Client.send = async (instance: unknown): Promise<unknown> => {
|
|
41
|
+
// if (instance instanceof DeleteVpcCommand) {
|
|
42
|
+
// return;
|
|
43
|
+
// }
|
|
44
|
+
// };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@Factory<Delete<%= resourceNamePascal %>ResourceAction>(Delete<%= resourceNamePascal %>ResourceAction)
|
|
49
|
+
export class Delete<%= resourceNamePascal %>ResourceActionFactory {
|
|
50
|
+
private static instance: Delete<%= resourceNamePascal %>ResourceAction;
|
|
51
|
+
|
|
52
|
+
static async create(): Promise<Delete<%= resourceNamePascal %>ResourceAction> {
|
|
53
|
+
if (!this.instance) {
|
|
54
|
+
this.instance = new Delete<%= resourceNamePascal %>ResourceAction();
|
|
55
|
+
}
|
|
56
|
+
return this.instance;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ANodeAction,
|
|
3
|
+
Action,
|
|
4
|
+
type Diff,
|
|
5
|
+
DiffAction,
|
|
6
|
+
type DiffValueTypeTagUpdate,
|
|
7
|
+
Factory,
|
|
8
|
+
type IResourceAction,
|
|
9
|
+
hasNodeName,
|
|
10
|
+
} from '@quadnix/octo';
|
|
11
|
+
import { <%= resourceNamePascal %> } from '../<%= resourceName %>.resource.js';
|
|
12
|
+
|
|
13
|
+
@Action(<%= resourceNamePascal %>)
|
|
14
|
+
export class Update<%= resourceNamePascal %>TagsResourceAction extends ANodeAction implements IResourceAction<<%= resourceNamePascal %>> {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
filter(diff: Diff): boolean {
|
|
20
|
+
return (
|
|
21
|
+
diff.action === DiffAction.UPDATE &&
|
|
22
|
+
diff.node instanceof <%= resourceNamePascal %> &&
|
|
23
|
+
hasNodeName(diff.node, '<%= resourceName %>') &&
|
|
24
|
+
diff.field === 'tags'
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async handle(diff: Diff<<%= resourceNamePascal %>, DiffValueTypeTagUpdate>): Promise<void> {
|
|
29
|
+
// Get properties.
|
|
30
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
31
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
32
|
+
const response = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.response;
|
|
33
|
+
const tagUpdates = diff.value;
|
|
34
|
+
|
|
35
|
+
// Fix me: Implement the update-tag resource logic.
|
|
36
|
+
// This is where you would update tags of the actual resource.
|
|
37
|
+
// E.g.,
|
|
38
|
+
/*
|
|
39
|
+
// Get instances.
|
|
40
|
+
const ec2Client = await this.container.get<EC2Client, typeof EC2ClientFactory>(EC2Client, {
|
|
41
|
+
args: [properties.awsAccountId, properties.awsRegionId],
|
|
42
|
+
metadata: { package: '@example' },
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Delete tags.
|
|
46
|
+
if (tagUpdates.delete.length > 0) {
|
|
47
|
+
await ec2Client.send(
|
|
48
|
+
new DeleteTagsCommand({
|
|
49
|
+
Resources: [response.ResourceId!],
|
|
50
|
+
Tags: tagUpdates.delete.map((tag) => ({ Key: tag })),
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Add/Update tags.
|
|
56
|
+
if (Object.keys(tagUpdates.add).length > 0 || Object.keys(tagUpdates.update).length > 0) {
|
|
57
|
+
await ec2Client.send(
|
|
58
|
+
new CreateTagsCommand({
|
|
59
|
+
Resources: [response.ResourceId!],
|
|
60
|
+
Tags: Object.entries({ ...tagUpdates.add, ...tagUpdates.update }).map(([key, value]) => ({
|
|
61
|
+
Key: key,
|
|
62
|
+
Value: value,
|
|
63
|
+
})),
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
*/
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async mock(diff: Diff<<%= resourceNamePascal %>, DiffValueTypeTagUpdate>): Promise<void> {
|
|
71
|
+
// Get properties.
|
|
72
|
+
const <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %> = diff.node;
|
|
73
|
+
const properties = <%= resourceNamePascal.toLowerCase().charAt(0) + resourceNamePascal.slice(1) %>.properties;
|
|
74
|
+
|
|
75
|
+
// Fix me: Implement mock logic for captures.
|
|
76
|
+
// E.g.,
|
|
77
|
+
// const ec2Client = await this.container.get<EC2Client, typeof EC2ClientFactory>(EC2Client, {
|
|
78
|
+
// args: [properties.awsAccountId, properties.awsRegionId],
|
|
79
|
+
// metadata: { package: '@example' },
|
|
80
|
+
// });
|
|
81
|
+
// ec2Client.send = async (): Promise<void> => {};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@Factory<Update<%= resourceNamePascal %>TagsResourceAction>(Update<%= resourceNamePascal %>TagsResourceAction)
|
|
86
|
+
export class Update<%= resourceNamePascal %>TagsResourceActionFactory {
|
|
87
|
+
private static instance: Update<%= resourceNamePascal %>TagsResourceAction;
|
|
88
|
+
|
|
89
|
+
static async create(): Promise<Update<%= resourceNamePascal %>TagsResourceAction> {
|
|
90
|
+
if (!this.instance) {
|
|
91
|
+
this.instance = new Update<%= resourceNamePascal %>TagsResourceAction();
|
|
92
|
+
}
|
|
93
|
+
return this.instance;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseResourceSchema, Schema, Validate } from '@quadnix/octo';
|
|
2
|
+
|
|
3
|
+
export class <%= resourceNamePascal %>Schema extends BaseResourceSchema {
|
|
4
|
+
@Validate({
|
|
5
|
+
destruct: (value: <%= resourceNamePascal %>Schema['properties']): string[] => [
|
|
6
|
+
// Fix me: Add properties for validation.
|
|
7
|
+
],
|
|
8
|
+
options: { minLength: 1 },
|
|
9
|
+
})
|
|
10
|
+
override properties = Schema<{
|
|
11
|
+
// Fix me: Add resource properties.
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
@Validate({
|
|
15
|
+
destruct: (value: <%= resourceNamePascal %>Schema['response']): string[] => {
|
|
16
|
+
const subjects: string[] = [];
|
|
17
|
+
// Fix me: Add response properties for validation.
|
|
18
|
+
// E.g.,
|
|
19
|
+
// if (value.Arn) {
|
|
20
|
+
// subjects.push(value.Arn);
|
|
21
|
+
// }
|
|
22
|
+
return subjects;
|
|
23
|
+
},
|
|
24
|
+
options: { minLength: 1 },
|
|
25
|
+
})
|
|
26
|
+
override response = Schema<{
|
|
27
|
+
// Fix me: Add response properties.
|
|
28
|
+
// Response properties are always optional because actions are applied to transaction sequentially.
|
|
29
|
+
// These properties must only be validated if they are present.
|
|
30
|
+
}>();
|
|
31
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './actions/add-<%= resourceName %>.resource.action.js';
|
|
2
|
+
import './actions/delete-<%= resourceName %>.resource.action.js';
|
|
3
|
+
import './actions/update-<%= resourceName %>-tags.resource.action.js';
|
|
4
|
+
|
|
5
|
+
export { <%= resourceNamePascal %> } from './<%= resourceName %>.resource.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AResource, Resource } from '@quadnix/octo';
|
|
2
|
+
import { <%= resourceNamePascal %>Schema } from './index.schema.js';
|
|
3
|
+
|
|
4
|
+
@Resource<<%= resourceNamePascal %>>('<%= packageName %>', '<%= resourceName %>', <%= resourceNamePascal %>Schema)
|
|
5
|
+
export class <%= resourceNamePascal %> extends AResource<<%= resourceNamePascal %>Schema, <%= resourceNamePascal %>> {
|
|
6
|
+
declare properties: <%= resourceNamePascal %>Schema['properties'];
|
|
7
|
+
declare response: <%= resourceNamePascal %>Schema['response'];
|
|
8
|
+
|
|
9
|
+
constructor(resourceId: string, properties: <%= resourceNamePascal %>Schema['properties'], parents: []) {
|
|
10
|
+
super(resourceId, properties, parents);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createResourceCommand } from './create-resource.command.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/create-resource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,13 @@ import * as process from 'process';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import yargs from 'yargs/yargs';
|
|
5
5
|
import { buildCommand } from './commands/build/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { createAnchorCommand } from './commands/create-anchor/index.js';
|
|
7
|
+
import { createAppCommand } from './commands/create-app/index.js';
|
|
8
|
+
import { createCdkCommand } from './commands/create-cdk/index.js';
|
|
9
|
+
import { createModelCommand } from './commands/create-model/index.js';
|
|
10
|
+
import { createModuleCommand } from './commands/create-module/index.js';
|
|
11
|
+
import { createOverlayCommand } from './commands/create-overlay/index.js';
|
|
12
|
+
import { createResourceCommand } from './commands/create-resource/index.js';
|
|
7
13
|
const PROGRAM_NAME = 'octo';
|
|
8
14
|
const parser = yargs(process.argv.slice(2))
|
|
9
15
|
.scriptName(PROGRAM_NAME)
|
|
@@ -13,7 +19,13 @@ const parser = yargs(process.argv.slice(2))
|
|
|
13
19
|
.alias('h', 'help')
|
|
14
20
|
.version()
|
|
15
21
|
.alias('v', 'version');
|
|
16
|
-
parser.command(
|
|
22
|
+
parser.command(createAnchorCommand);
|
|
23
|
+
parser.command(createAppCommand);
|
|
24
|
+
parser.command(createCdkCommand);
|
|
25
|
+
parser.command(createModelCommand);
|
|
26
|
+
parser.command(createModuleCommand);
|
|
27
|
+
parser.command(createOverlayCommand);
|
|
28
|
+
parser.command(createResourceCommand);
|
|
17
29
|
parser.command(buildCommand);
|
|
18
30
|
await parser.argv;
|
|
19
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACxC,UAAU,CAAC,YAAY,CAAC;KACxB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;KACnD,aAAa,CAAC,CAAC,EAAE,2BAA2B,CAAC;KAC7C,IAAI,EAAE;KACN,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;KAClB,OAAO,EAAE;KACT,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEzB,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACpC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACnC,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACpC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACrC,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACtC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAE7B,MAAM,MAAM,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare class StringUtility {
|
|
2
|
+
static AVAILABLE_MODEL_TYPES: readonly ["account", "app", "deployment", "environment", "execution", "filesystem", "image", "pipeline", "region", "server", "service", "subnet"];
|
|
3
|
+
static isKebabCase(subject: string): boolean;
|
|
4
|
+
static toPascalCase(subject: string): string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class StringUtility {
|
|
2
|
+
static { this.AVAILABLE_MODEL_TYPES = [
|
|
3
|
+
'account',
|
|
4
|
+
'app',
|
|
5
|
+
'deployment',
|
|
6
|
+
'environment',
|
|
7
|
+
'execution',
|
|
8
|
+
'filesystem',
|
|
9
|
+
'image',
|
|
10
|
+
'pipeline',
|
|
11
|
+
'region',
|
|
12
|
+
'server',
|
|
13
|
+
'service',
|
|
14
|
+
'subnet',
|
|
15
|
+
]; }
|
|
16
|
+
static isKebabCase(subject) {
|
|
17
|
+
return /^[a-z][a-z0-9-]*[a-z0-9]$/.test(subject);
|
|
18
|
+
}
|
|
19
|
+
static toPascalCase(subject) {
|
|
20
|
+
return subject
|
|
21
|
+
.split('-')
|
|
22
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
23
|
+
.join('');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=string.utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.utility.js","sourceRoot":"","sources":["../../../src/utilities/string/string.utility.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAa;aACjB,0BAAqB,GAAG;QAC7B,SAAS;QACT,KAAK;QACL,YAAY;QACZ,aAAa;QACb,WAAW;QACX,YAAY;QACZ,OAAO;QACP,UAAU;QACV,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACA,CAAC;IAEX,MAAM,CAAC,WAAW,CAAC,OAAe;QAChC,OAAO,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAe;QACjC,OAAO,OAAO;aACX,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aAC3D,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/js-yaml": "~4.0.9"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=18.18.0"
|
|
22
22
|
},
|
|
23
23
|
"exports": "./dist/index.js",
|
|
24
24
|
"files": [
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
},
|
|
91
91
|
"type": "module",
|
|
92
92
|
"types": "./dist/index.d.ts",
|
|
93
|
-
"version": "0.0.
|
|
93
|
+
"version": "0.0.9"
|
|
94
94
|
}
|
|
@@ -1 +0,0 @@
|
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C;QAEvE,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;QACxB,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,qDAAqD,CAAC,EAAE;YACtF,SAAS,EAAE,iCAAiC;SAC7C,CAAC,CAAC;QAEH,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,iCAAiC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE;gBACvE,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACnE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/create/generator-octo-app-template/generators/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,SAAS,EAAE,EAAoB,MAAM,kBAAkB,CAAC;AAE/D,MAAM,CAAC,OAAO,MAAO,SAAQ,SAAS;IAKpC,YAAY,IAAc,EAAE,IAAiB;QAC3C,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,CAAC,WAAW,GAA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