@nanoforge-dev/schematics 2.1.5-beta.6bb4b4c → 2.1.5-beta.a008fc6
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/libs/application/application.factory.d.ts.map +1 -1
- package/dist/libs/application/application.factory.js +0 -1
- package/dist/libs/application/application.factory.js.map +1 -1
- package/package.json +1 -1
- package/dist/libs/application/files/js/pnpm-workspace.yaml.template +0 -3
- package/dist/libs/application/files/ts/pnpm-workspace.yaml.template +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.factory.d.ts","names":["name","version","author","description","directory","language","strict","lint","packageManager","server","editor","initFunctions"],"sources":["../../../src/libs/application/application.schema.d.ts","../../../src/libs/application/application.factory.ts"],"mappings":";;;UAAiB,iBAAA;;;AAAjB;EAIEA,IAAAA;EAJgC;;;EAShCC,OAAAA;EAeAG;;;EAVAF,MAAAA;EAmCAO;;;EA9BAN,WAAAA;;;;EAKAC,SAAAA;;;;EAKAC,QAAAA;
|
|
1
|
+
{"version":3,"file":"application.factory.d.ts","names":["name","version","author","description","directory","language","strict","lint","packageManager","server","editor","initFunctions"],"sources":["../../../src/libs/application/application.schema.d.ts","../../../src/libs/application/application.factory.ts"],"mappings":";;;UAAiB,iBAAA;;;AAAjB;EAIEA,IAAAA;EAJgC;;;EAShCC,OAAAA;EAeAG;;;EAVAF,MAAAA;EAmCAO;;;EA9BAN,WAAAA;;;;EAKAC,SAAAA;;;;EAKAC,QAAAA;ECqDD;AAAA;;EDhDCC,MAAAA;;;;EAKAC,IAAAA;;;;EAKAC,cAAAA;;;;EAKAC,MAAAA;;;;EAKAC,MAAAA;;;;EAKAC,aAAAA;AAAAA;;;cCJW,IAAA,GAAQ,MAAA,EAAQ,iBAAA,KAAoB,IA2BhD"}
|
|
@@ -47,7 +47,6 @@ const main = (schema) => {
|
|
|
47
47
|
if (options.language === "js") tree.delete(join(basePath, "jsconfig.json"));
|
|
48
48
|
}
|
|
49
49
|
if (!options.server) tree.delete(join(basePath, ".env"));
|
|
50
|
-
if (options.packageManager !== "pnpm") tree.delete(join(basePath, "pnpm-workspace.yaml"));
|
|
51
50
|
return tree;
|
|
52
51
|
};
|
|
53
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.factory.js","names":[],"sources":["../../../src/defaults.ts","../../../src/libs/application/application.factory.ts"],"sourcesContent":["export const DEFAULT_APP_NAME = \"nanoforge-app\";\nexport const DEFAULT_VERSION = \"0.0.0\";\nexport const DEFAULT_AUTHOR = \"\";\nexport const DEFAULT_DESCRIPTION = \"\";\nexport const DEFAULT_LANGUAGE = \"ts\";\nexport const DEFAULT_PACKAGE_MANAGER = \"npm\";\n","import { type Path, join, normalize, strings } from \"@angular-devkit/core\";\nimport {\n type Rule,\n type SchematicContext,\n type Source,\n type Tree,\n apply,\n mergeWith,\n move,\n renameTemplateFiles,\n template,\n url,\n} from \"@angular-devkit/schematics\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n DEFAULT_APP_NAME,\n DEFAULT_AUTHOR,\n DEFAULT_DESCRIPTION,\n DEFAULT_LANGUAGE,\n DEFAULT_PACKAGE_MANAGER,\n DEFAULT_VERSION,\n} from \"~/defaults\";\n\nimport { type ApplicationOptions } from \"./application.options\";\nimport { type ApplicationSchema } from \"./application.schema\";\n\nconst transform = (schema: ApplicationSchema): ApplicationOptions => {\n return {\n name: schema.name ?? DEFAULT_APP_NAME,\n version: schema.version ?? DEFAULT_VERSION,\n author: schema.author ?? DEFAULT_AUTHOR,\n description: schema.description ?? DEFAULT_DESCRIPTION,\n language: schema.language ?? DEFAULT_LANGUAGE,\n strict: schema.strict ?? true,\n lint: schema.lint ?? true,\n packageManager: schema.packageManager ?? DEFAULT_PACKAGE_MANAGER,\n server: schema.server ?? false,\n editor: schema.editor ?? false,\n initFunctions: schema.initFunctions ?? false,\n };\n};\n\nconst generate = (options: ApplicationOptions, path: string): Source => {\n return apply(url(join(\"./files\" as Path, options.language)), [\n template({\n dot: \".\",\n ...strings,\n ...options,\n }),\n renameTemplateFiles(),\n move(normalize(path)),\n ]);\n};\n\nexport const main = (schema: ApplicationSchema): Rule => {\n const options = transform(schema);\n const path = schema.directory ?? options.name;\n\n return async (baseTree: Tree, context: SchematicContext) => {\n let tree = await mergeWith(generate(options, path))(baseTree, context);\n if (!tree) return tree;\n if (!(\"delete\" in tree)) {\n if (typeof tree === \"function\") return tree;\n tree = await firstValueFrom(tree);\n }\n\n const basePath = join(\"/\" as Path, path);\n\n if (!options.lint) {\n tree.delete(join(basePath, \"eslint.config.js\"));\n tree.delete(join(basePath, \"prettier.config.js\"));\n tree.delete(join(basePath, \".prettierignore\"));\n if (options.language === \"js\") tree.delete(join(basePath, \"jsconfig.json\"));\n }\n\n if (!options.server) {\n tree.delete(join(basePath, \".env\"));\n }\n\n
|
|
1
|
+
{"version":3,"file":"application.factory.js","names":[],"sources":["../../../src/defaults.ts","../../../src/libs/application/application.factory.ts"],"sourcesContent":["export const DEFAULT_APP_NAME = \"nanoforge-app\";\nexport const DEFAULT_VERSION = \"0.0.0\";\nexport const DEFAULT_AUTHOR = \"\";\nexport const DEFAULT_DESCRIPTION = \"\";\nexport const DEFAULT_LANGUAGE = \"ts\";\nexport const DEFAULT_PACKAGE_MANAGER = \"npm\";\n","import { type Path, join, normalize, strings } from \"@angular-devkit/core\";\nimport {\n type Rule,\n type SchematicContext,\n type Source,\n type Tree,\n apply,\n mergeWith,\n move,\n renameTemplateFiles,\n template,\n url,\n} from \"@angular-devkit/schematics\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n DEFAULT_APP_NAME,\n DEFAULT_AUTHOR,\n DEFAULT_DESCRIPTION,\n DEFAULT_LANGUAGE,\n DEFAULT_PACKAGE_MANAGER,\n DEFAULT_VERSION,\n} from \"~/defaults\";\n\nimport { type ApplicationOptions } from \"./application.options\";\nimport { type ApplicationSchema } from \"./application.schema\";\n\nconst transform = (schema: ApplicationSchema): ApplicationOptions => {\n return {\n name: schema.name ?? DEFAULT_APP_NAME,\n version: schema.version ?? DEFAULT_VERSION,\n author: schema.author ?? DEFAULT_AUTHOR,\n description: schema.description ?? DEFAULT_DESCRIPTION,\n language: schema.language ?? DEFAULT_LANGUAGE,\n strict: schema.strict ?? true,\n lint: schema.lint ?? true,\n packageManager: schema.packageManager ?? DEFAULT_PACKAGE_MANAGER,\n server: schema.server ?? false,\n editor: schema.editor ?? false,\n initFunctions: schema.initFunctions ?? false,\n };\n};\n\nconst generate = (options: ApplicationOptions, path: string): Source => {\n return apply(url(join(\"./files\" as Path, options.language)), [\n template({\n dot: \".\",\n ...strings,\n ...options,\n }),\n renameTemplateFiles(),\n move(normalize(path)),\n ]);\n};\n\nexport const main = (schema: ApplicationSchema): Rule => {\n const options = transform(schema);\n const path = schema.directory ?? options.name;\n\n return async (baseTree: Tree, context: SchematicContext) => {\n let tree = await mergeWith(generate(options, path))(baseTree, context);\n if (!tree) return tree;\n if (!(\"delete\" in tree)) {\n if (typeof tree === \"function\") return tree;\n tree = await firstValueFrom(tree);\n }\n\n const basePath = join(\"/\" as Path, path);\n\n if (!options.lint) {\n tree.delete(join(basePath, \"eslint.config.js\"));\n tree.delete(join(basePath, \"prettier.config.js\"));\n tree.delete(join(basePath, \".prettierignore\"));\n if (options.language === \"js\") tree.delete(join(basePath, \"jsconfig.json\"));\n }\n\n if (!options.server) {\n tree.delete(join(basePath, \".env\"));\n }\n\n return tree;\n };\n};\n"],"mappings":";;;;;AC2BA,MAAM,aAAa,WAAkD;CACnE,OAAO;EACL,MAAM,OAAO,QAAA;EACb,SAAS,OAAO,WAAA;EAChB,QAAQ,OAAO,UAAA;EACf,aAAa,OAAO,eAAA;EACpB,UAAU,OAAO,YAAA;EACjB,QAAQ,OAAO,UAAU;EACzB,MAAM,OAAO,QAAQ;EACrB,gBAAgB,OAAO,kBAAA;EACvB,QAAQ,OAAO,UAAU;EACzB,QAAQ,OAAO,UAAU;EACzB,eAAe,OAAO,iBA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