@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.120
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/README.md +146 -74
- package/bin/run.js +0 -0
- package/dist/cjs/create-package-root.cjs +65 -0
- package/dist/cjs/index.cjs +498 -0
- package/dist/cjs/locale/en.cjs +94 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +94 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace.cjs +6797 -0
- package/dist/esm/create-package-root.js +16 -0
- package/dist/esm/index.js +461 -0
- package/dist/esm/locale/en.js +56 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +56 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace.js +6738 -0
- package/dist/esm-node/create-package-root.js +17 -0
- package/dist/esm-node/index.js +462 -0
- package/dist/esm-node/locale/en.js +57 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +57 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace.js +6739 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +7 -7
- package/dist/types/locale/index.d.ts +111 -2
- package/dist/types/locale/zh.d.ts +7 -7
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace.d.ts +12 -3
- package/package.json +33 -15
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/skills-lock.json +19 -0
- package/template-workspace/.codex/hooks.json +16 -0
- package/template-workspace/.github/renovate.json +29 -0
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +70 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +2 -0
- package/template-workspace/AGENTS.md +43 -11
- package/template-workspace/README.md.handlebars +116 -11
- package/template-workspace/lefthook.yml +24 -0
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/pnpm-workspace.yaml +31 -8
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +204 -21
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
- package/dist/index.js +0 -2626
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -30
- package/template/.gitignore.handlebars +0 -30
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -25
- package/template/README.md +0 -79
- package/template/api/effect/index.ts.handlebars +0 -23
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/public/locales/cs/translation.json +0 -39
- package/template/config/public/locales/en/translation.json +0 -39
- package/template/modern.config.ts.handlebars +0 -53
- package/template/oxfmt.config.ts +0 -8
- package/template/oxlint.config.ts +0 -12
- package/template/package.json.handlebars +0 -67
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/scripts/bootstrap-agent-skills.mjs +0 -95
- package/template/scripts/check-i18n-strings.mjs +0 -83
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -178
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -1
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/index.css.handlebars +0 -129
- package/template/src/routes/layout.tsx.handlebars +0 -9
- package/template/src/routes/page.tsx.handlebars +0 -155
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tsconfig.json +0 -120
- package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import node_fs from "node:fs";
|
|
3
|
+
import node_path from "node:path";
|
|
4
|
+
function resolveCreatePackageRoot(fromDir) {
|
|
5
|
+
const candidates = [
|
|
6
|
+
fromDir,
|
|
7
|
+
node_path.resolve(fromDir, '..'),
|
|
8
|
+
node_path.resolve(fromDir, '..', '..')
|
|
9
|
+
];
|
|
10
|
+
const seen = new Set();
|
|
11
|
+
for (const candidate of candidates)if (!seen.has(candidate)) {
|
|
12
|
+
seen.add(candidate);
|
|
13
|
+
if (node_fs.existsSync(node_path.join(candidate, 'package.json')) && node_fs.existsSync(node_path.join(candidate, 'template-workspace'))) return candidate;
|
|
14
|
+
}
|
|
15
|
+
throw new Error('Unable to resolve create package root');
|
|
16
|
+
}
|
|
17
|
+
export { resolveCreatePackageRoot };
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { execFileSync } from "node:child_process";
|
|
3
|
+
import node_fs from "node:fs";
|
|
4
|
+
import node_path from "node:path";
|
|
5
|
+
import node_readline from "node:readline";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { resolveCreatePackageRoot } from "./create-package-root.js";
|
|
8
|
+
import { i18n, localeKeys } from "./locale/index.js";
|
|
9
|
+
import { BLEEDINGDEV_CREATE_PACKAGE, BLEEDINGDEV_FRAMEWORK_VERSION_ENV, BLEEDINGDEV_PACKAGE_NAME_PREFIX, BLEEDINGDEV_PACKAGE_SCOPE, WORKSPACE_PACKAGE_VERSION } from "./ultramodern-package-source.js";
|
|
10
|
+
import { addUltramodernVertical, generateUltramodernWorkspace } from "./ultramodern-workspace.js";
|
|
11
|
+
const src_dirname = node_path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const createPackageRoot = resolveCreatePackageRoot(src_dirname);
|
|
13
|
+
const semverPattern = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
14
|
+
const LEGACY_MODERN_JS_FLAG = '--legacy-modern-js';
|
|
15
|
+
const LEGACY_MODERN_JS_CONFIRMATION = 'USE LEGACY MODERN.JS';
|
|
16
|
+
function getOptionValue(args, names) {
|
|
17
|
+
for (const name of names){
|
|
18
|
+
const prefix = `${name}=`;
|
|
19
|
+
const byEquals = args.find((arg)=>arg.startsWith(prefix));
|
|
20
|
+
if (byEquals) return byEquals.slice(prefix.length);
|
|
21
|
+
const index = args.findIndex((arg)=>arg === name);
|
|
22
|
+
if (-1 !== index && args[index + 1] && !args[index + 1].startsWith('-')) return args[index + 1];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const detectLanguage = ()=>{
|
|
26
|
+
const lang = getOptionValue(process.argv.slice(2), [
|
|
27
|
+
'--lang',
|
|
28
|
+
'-l'
|
|
29
|
+
]);
|
|
30
|
+
if ('zh' === lang) return 'zh';
|
|
31
|
+
return 'en';
|
|
32
|
+
};
|
|
33
|
+
i18n.changeLanguage({
|
|
34
|
+
locale: detectLanguage()
|
|
35
|
+
});
|
|
36
|
+
function readCreatePackageJson() {
|
|
37
|
+
const createPackageJson = node_path.join(createPackageRoot, 'package.json');
|
|
38
|
+
return JSON.parse(node_fs.readFileSync(createPackageJson, 'utf-8'));
|
|
39
|
+
}
|
|
40
|
+
function isBleedingDevCreatePackage(createPackage) {
|
|
41
|
+
return createPackage.name === BLEEDINGDEV_CREATE_PACKAGE;
|
|
42
|
+
}
|
|
43
|
+
function getBleedingDevFrameworkVersion(createPackage, fallbackVersion) {
|
|
44
|
+
const frameworkVersion = createPackage.ultramodern?.frameworkVersion;
|
|
45
|
+
return 'string' == typeof frameworkVersion && frameworkVersion.length > 0 ? frameworkVersion : fallbackVersion;
|
|
46
|
+
}
|
|
47
|
+
function showVersion() {
|
|
48
|
+
const createPackage = readCreatePackageJson();
|
|
49
|
+
const version = createPackage.version || 'unknown';
|
|
50
|
+
console.log(i18n.t(localeKeys.version.message, {
|
|
51
|
+
version
|
|
52
|
+
}));
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
function showHelp() {
|
|
56
|
+
console.log(i18n.t(localeKeys.help.title));
|
|
57
|
+
console.log(i18n.t(localeKeys.help.description));
|
|
58
|
+
console.log('');
|
|
59
|
+
console.log(i18n.t(localeKeys.help.usage));
|
|
60
|
+
console.log(i18n.t(localeKeys.help.usageExample));
|
|
61
|
+
console.log('');
|
|
62
|
+
console.log(i18n.t(localeKeys.help.options));
|
|
63
|
+
console.log(i18n.t(localeKeys.help.optionHelp));
|
|
64
|
+
console.log(i18n.t(localeKeys.help.optionVersion));
|
|
65
|
+
console.log(i18n.t(localeKeys.help.optionLang));
|
|
66
|
+
if (localeKeys.help.optionTailwind) console.log(i18n.t(localeKeys.help.optionTailwind));
|
|
67
|
+
if (localeKeys.help.optionUltramodernPackageSource) console.log(i18n.t(localeKeys.help.optionUltramodernPackageSource));
|
|
68
|
+
if (localeKeys.help.optionUltramodernPackageScope) console.log(i18n.t(localeKeys.help.optionUltramodernPackageScope));
|
|
69
|
+
if (localeKeys.help.optionUltramodernPackageNamePrefix) console.log(i18n.t(localeKeys.help.optionUltramodernPackageNamePrefix));
|
|
70
|
+
if (localeKeys.help.optionVertical) console.log(i18n.t(localeKeys.help.optionVertical));
|
|
71
|
+
if (localeKeys.help.optionLegacyModernJs) console.log(i18n.t(localeKeys.help.optionLegacyModernJs));
|
|
72
|
+
console.log('');
|
|
73
|
+
console.log(i18n.t(localeKeys.help.examples));
|
|
74
|
+
console.log(i18n.t(localeKeys.help.example1));
|
|
75
|
+
console.log(i18n.t(localeKeys.help.example2));
|
|
76
|
+
if (localeKeys.help.example4) console.log(i18n.t(localeKeys.help.example4));
|
|
77
|
+
if (localeKeys.help.example5) console.log(i18n.t(localeKeys.help.example5));
|
|
78
|
+
if (localeKeys.help.example6) console.log(i18n.t(localeKeys.help.example6));
|
|
79
|
+
if (localeKeys.help.example12) console.log(i18n.t(localeKeys.help.example12));
|
|
80
|
+
console.log('');
|
|
81
|
+
console.log(i18n.t(localeKeys.help.moreInfo));
|
|
82
|
+
console.log('');
|
|
83
|
+
process.exit(0);
|
|
84
|
+
}
|
|
85
|
+
function promptInput(question) {
|
|
86
|
+
const rl = node_readline.createInterface({
|
|
87
|
+
input: process.stdin,
|
|
88
|
+
output: process.stdout
|
|
89
|
+
});
|
|
90
|
+
return new Promise((resolve)=>{
|
|
91
|
+
rl.question(question, (answer)=>{
|
|
92
|
+
rl.close();
|
|
93
|
+
resolve(answer.trim());
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function detectLegacyModernJsFlag(args) {
|
|
98
|
+
if (args.some((arg)=>arg.startsWith(`${LEGACY_MODERN_JS_FLAG}=`))) {
|
|
99
|
+
console.error(`${LEGACY_MODERN_JS_FLAG} does not accept a value.`);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
return args.includes(LEGACY_MODERN_JS_FLAG);
|
|
103
|
+
}
|
|
104
|
+
function stripLegacyModernJsArgs(args) {
|
|
105
|
+
return args.filter((arg)=>arg !== LEGACY_MODERN_JS_FLAG);
|
|
106
|
+
}
|
|
107
|
+
async function confirmLegacyModernJsSetup() {
|
|
108
|
+
console.error('');
|
|
109
|
+
console.error(i18n.t(localeKeys.message.legacyModernJsWarning));
|
|
110
|
+
console.error('');
|
|
111
|
+
const answer = await promptInput(i18n.t(localeKeys.prompt.legacyModernJsConfirmation, {
|
|
112
|
+
confirmation: LEGACY_MODERN_JS_CONFIRMATION
|
|
113
|
+
}));
|
|
114
|
+
if (answer !== LEGACY_MODERN_JS_CONFIRMATION) {
|
|
115
|
+
console.error(i18n.t(localeKeys.error.legacyModernJsNotConfirmed));
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function delegateLegacyModernJsSetup(args) {
|
|
120
|
+
const forwardedArgs = stripLegacyModernJsArgs(args);
|
|
121
|
+
if (commandExists('pnpm')) return void runSetupCommand('pnpm', [
|
|
122
|
+
'dlx',
|
|
123
|
+
'@modern-js/create',
|
|
124
|
+
...forwardedArgs
|
|
125
|
+
], {
|
|
126
|
+
stdio: 'inherit'
|
|
127
|
+
});
|
|
128
|
+
if (commandExists('npx')) return void runSetupCommand('npx', [
|
|
129
|
+
'@modern-js/create',
|
|
130
|
+
...forwardedArgs
|
|
131
|
+
], {
|
|
132
|
+
stdio: 'inherit'
|
|
133
|
+
});
|
|
134
|
+
throw new Error('Legacy Modern.js setup requires pnpm or npx to run @modern-js/create.');
|
|
135
|
+
}
|
|
136
|
+
function detectTailwindFlag() {
|
|
137
|
+
const args = process.argv.slice(2);
|
|
138
|
+
return !args.includes('--no-tailwind');
|
|
139
|
+
}
|
|
140
|
+
function detectExplicitTailwindFlag() {
|
|
141
|
+
const args = process.argv.slice(2);
|
|
142
|
+
if (args.includes('--no-tailwind')) return false;
|
|
143
|
+
if (args.includes('--tailwind')) return true;
|
|
144
|
+
}
|
|
145
|
+
function detectVerticalFlag() {
|
|
146
|
+
const args = process.argv.slice(2);
|
|
147
|
+
if (args.some((arg)=>arg.startsWith('--vertical='))) {
|
|
148
|
+
console.error('--vertical does not accept a value. Use: create <name> --vertical');
|
|
149
|
+
process.exit(1);
|
|
150
|
+
}
|
|
151
|
+
return args.includes('--vertical');
|
|
152
|
+
}
|
|
153
|
+
function detectUltramodernPackageSource(args, defaultPackageVersion, createPackage) {
|
|
154
|
+
const bleedingDevDefaults = isBleedingDevCreatePackage(createPackage);
|
|
155
|
+
const strategy = getOptionValue(args, [
|
|
156
|
+
'--ultramodern-package-source'
|
|
157
|
+
]) ?? (bleedingDevDefaults ? 'install' : 'workspace');
|
|
158
|
+
if ('workspace' !== strategy && 'install' !== strategy) {
|
|
159
|
+
console.error('--ultramodern-package-source must be "workspace" or "install"');
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
const packageSourceStrategy = strategy;
|
|
163
|
+
const explicitRegistry = getOptionValue(args, [
|
|
164
|
+
'--ultramodern-package-registry'
|
|
165
|
+
]);
|
|
166
|
+
const aliasScope = getOptionValue(args, [
|
|
167
|
+
'--ultramodern-package-scope'
|
|
168
|
+
]) ?? (bleedingDevDefaults && 'install' === packageSourceStrategy && !explicitRegistry ? BLEEDINGDEV_PACKAGE_SCOPE : void 0);
|
|
169
|
+
return {
|
|
170
|
+
strategy: packageSourceStrategy,
|
|
171
|
+
modernPackageVersion: getOptionValue(args, [
|
|
172
|
+
'--ultramodern-package-version'
|
|
173
|
+
]) ?? defaultPackageVersion,
|
|
174
|
+
registry: explicitRegistry,
|
|
175
|
+
aliasScope,
|
|
176
|
+
aliasPackageNamePrefix: getOptionValue(args, [
|
|
177
|
+
'--ultramodern-package-name-prefix'
|
|
178
|
+
]) ?? (aliasScope ? BLEEDINGDEV_PACKAGE_NAME_PREFIX : void 0)
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function hasExplicitUltramodernPackageSource(args, value) {
|
|
182
|
+
const configuredValue = getOptionValue(args, [
|
|
183
|
+
'--ultramodern-package-source'
|
|
184
|
+
]);
|
|
185
|
+
return value ? configuredValue === value : void 0 !== configuredValue;
|
|
186
|
+
}
|
|
187
|
+
function readBleedingDevFrameworkVersionFromRegistry() {
|
|
188
|
+
const envVersion = process.env[BLEEDINGDEV_FRAMEWORK_VERSION_ENV]?.trim();
|
|
189
|
+
if (envVersion) {
|
|
190
|
+
if (!semverPattern.test(envVersion)) {
|
|
191
|
+
console.error(`${BLEEDINGDEV_FRAMEWORK_VERSION_ENV} must be a valid semver version`);
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
return envVersion;
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
const rawVersion = runSetupCommand('npm', [
|
|
198
|
+
'view',
|
|
199
|
+
`${BLEEDINGDEV_CREATE_PACKAGE}@latest`,
|
|
200
|
+
'ultramodern.frameworkVersion',
|
|
201
|
+
'--json'
|
|
202
|
+
]).trim();
|
|
203
|
+
const version = JSON.parse(rawVersion);
|
|
204
|
+
if ('string' == typeof version && semverPattern.test(version)) return version;
|
|
205
|
+
} catch {}
|
|
206
|
+
console.error([
|
|
207
|
+
`Could not resolve ${BLEEDINGDEV_CREATE_PACKAGE}@latest ultramodern.frameworkVersion.`,
|
|
208
|
+
'Pass --workspace to use local workspace protocol dependencies,',
|
|
209
|
+
'or pass --ultramodern-package-version with the exact BleedingDev framework cohort.'
|
|
210
|
+
].join(' '));
|
|
211
|
+
process.exit(1);
|
|
212
|
+
}
|
|
213
|
+
function resolveInstallBackedPackageSource(args, createPackage, packageSource) {
|
|
214
|
+
const explicitVersion = getOptionValue(args, [
|
|
215
|
+
'--ultramodern-package-version'
|
|
216
|
+
]);
|
|
217
|
+
const explicitRegistry = getOptionValue(args, [
|
|
218
|
+
'--ultramodern-package-registry'
|
|
219
|
+
]);
|
|
220
|
+
const aliasScope = getOptionValue(args, [
|
|
221
|
+
'--ultramodern-package-scope'
|
|
222
|
+
]) ?? packageSource.aliasScope ?? (explicitRegistry ? void 0 : BLEEDINGDEV_PACKAGE_SCOPE);
|
|
223
|
+
return {
|
|
224
|
+
...packageSource,
|
|
225
|
+
strategy: 'install',
|
|
226
|
+
modernPackageVersion: explicitVersion ?? (isBleedingDevCreatePackage(createPackage) ? packageSource.modernPackageVersion : readBleedingDevFrameworkVersionFromRegistry()),
|
|
227
|
+
aliasScope,
|
|
228
|
+
aliasPackageNamePrefix: getOptionValue(args, [
|
|
229
|
+
'--ultramodern-package-name-prefix'
|
|
230
|
+
]) ?? packageSource.aliasPackageNamePrefix ?? (aliasScope ? BLEEDINGDEV_PACKAGE_NAME_PREFIX : void 0)
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function resolveWorkspacePackageSource(args, createPackage, packageSource) {
|
|
234
|
+
if (hasExplicitUltramodernPackageSource(args, 'workspace')) return {
|
|
235
|
+
...packageSource,
|
|
236
|
+
strategy: 'workspace',
|
|
237
|
+
modernPackageVersion: WORKSPACE_PACKAGE_VERSION
|
|
238
|
+
};
|
|
239
|
+
return resolveInstallBackedPackageSource(args, createPackage, packageSource);
|
|
240
|
+
}
|
|
241
|
+
function runSetupCommand(command, args, options = {}) {
|
|
242
|
+
return execFileSync(command, args, {
|
|
243
|
+
cwd: options.cwd,
|
|
244
|
+
encoding: 'utf-8',
|
|
245
|
+
stdio: options.stdio ?? [
|
|
246
|
+
'ignore',
|
|
247
|
+
'pipe',
|
|
248
|
+
'pipe'
|
|
249
|
+
]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function commandExists(command) {
|
|
253
|
+
try {
|
|
254
|
+
runSetupCommand(command, [
|
|
255
|
+
'--version'
|
|
256
|
+
], {
|
|
257
|
+
stdio: 'ignore'
|
|
258
|
+
});
|
|
259
|
+
return true;
|
|
260
|
+
} catch {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function installGitForGeneratedProject() {
|
|
265
|
+
if (commandExists('git')) return;
|
|
266
|
+
const runShell = (script)=>runSetupCommand('sh', [
|
|
267
|
+
'-lc',
|
|
268
|
+
script
|
|
269
|
+
], {
|
|
270
|
+
stdio: 'inherit'
|
|
271
|
+
});
|
|
272
|
+
const sudo = 'function' == typeof process.getuid && 0 === process.getuid() ? '' : 'sudo ';
|
|
273
|
+
if (commandExists('brew')) runSetupCommand('brew', [
|
|
274
|
+
'install',
|
|
275
|
+
'git'
|
|
276
|
+
], {
|
|
277
|
+
stdio: 'inherit'
|
|
278
|
+
});
|
|
279
|
+
else if ('linux' === process.platform && commandExists('apt-get')) runShell(`${sudo}apt-get update && ${sudo}apt-get install -y git`);
|
|
280
|
+
else if ('linux' === process.platform && commandExists('dnf')) runShell(`${sudo}dnf install -y git`);
|
|
281
|
+
else if ('linux' === process.platform && commandExists('yum')) runShell(`${sudo}yum install -y git`);
|
|
282
|
+
else if ('linux' === process.platform && commandExists('apk')) runShell('apk add --no-cache git');
|
|
283
|
+
if (!commandExists('git')) throw new Error('Git is required for UltraModern setup. Install git and rerun create, or run pnpm skills:install after installing git.');
|
|
284
|
+
}
|
|
285
|
+
function isInsideGitWorkTree(targetDir) {
|
|
286
|
+
try {
|
|
287
|
+
return 'true' === runSetupCommand('git', [
|
|
288
|
+
'rev-parse',
|
|
289
|
+
'--is-inside-work-tree'
|
|
290
|
+
], {
|
|
291
|
+
cwd: targetDir
|
|
292
|
+
}).trim();
|
|
293
|
+
} catch {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function initializeGeneratedGitRepository(targetDir) {
|
|
298
|
+
installGitForGeneratedProject();
|
|
299
|
+
if (isInsideGitWorkTree(targetDir)) return;
|
|
300
|
+
try {
|
|
301
|
+
runSetupCommand('git', [
|
|
302
|
+
'init',
|
|
303
|
+
'-b',
|
|
304
|
+
'main'
|
|
305
|
+
], {
|
|
306
|
+
cwd: targetDir,
|
|
307
|
+
stdio: 'inherit'
|
|
308
|
+
});
|
|
309
|
+
} catch {
|
|
310
|
+
runSetupCommand('git', [
|
|
311
|
+
'init'
|
|
312
|
+
], {
|
|
313
|
+
cwd: targetDir,
|
|
314
|
+
stdio: 'inherit'
|
|
315
|
+
});
|
|
316
|
+
runSetupCommand('git', [
|
|
317
|
+
'branch',
|
|
318
|
+
'-M',
|
|
319
|
+
'main'
|
|
320
|
+
], {
|
|
321
|
+
cwd: targetDir,
|
|
322
|
+
stdio: 'inherit'
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function isDirectoryEmpty(dirPath) {
|
|
327
|
+
if (!node_fs.existsSync(dirPath)) return false;
|
|
328
|
+
try {
|
|
329
|
+
const files = node_fs.readdirSync(dirPath);
|
|
330
|
+
return 0 === files.length;
|
|
331
|
+
} catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
async function getProjectName() {
|
|
336
|
+
const args = process.argv.slice(2);
|
|
337
|
+
const optionWithValue = new Set([
|
|
338
|
+
'--lang',
|
|
339
|
+
'-l',
|
|
340
|
+
'--ultramodern-package-source',
|
|
341
|
+
'--ultramodern-package-version',
|
|
342
|
+
'--ultramodern-package-registry',
|
|
343
|
+
'--ultramodern-package-scope',
|
|
344
|
+
'--ultramodern-package-name-prefix'
|
|
345
|
+
]);
|
|
346
|
+
const optionWithoutValue = new Set([
|
|
347
|
+
'--help',
|
|
348
|
+
'-h',
|
|
349
|
+
'--version',
|
|
350
|
+
'-v',
|
|
351
|
+
'--tailwind',
|
|
352
|
+
'--no-tailwind',
|
|
353
|
+
'--workspace',
|
|
354
|
+
'--vertical',
|
|
355
|
+
LEGACY_MODERN_JS_FLAG
|
|
356
|
+
]);
|
|
357
|
+
const positionalArgs = [];
|
|
358
|
+
for(let i = 0; i < args.length; i++){
|
|
359
|
+
const arg = args[i];
|
|
360
|
+
if (!optionWithoutValue.has(arg)) {
|
|
361
|
+
if (optionWithValue.has(arg)) {
|
|
362
|
+
i += 1;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
if (!(arg.startsWith('--lang=') || arg.startsWith('--ultramodern-package-source=') || arg.startsWith('--ultramodern-package-version=') || arg.startsWith('--ultramodern-package-registry=') || arg.startsWith('--ultramodern-package-scope=') || arg.startsWith('--ultramodern-package-name-prefix='))) positionalArgs.push(arg);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (positionalArgs.length > 1) {
|
|
369
|
+
console.error(`Unexpected positional argument: ${positionalArgs[1]}`);
|
|
370
|
+
process.exit(1);
|
|
371
|
+
}
|
|
372
|
+
const projectNameArg = positionalArgs[0];
|
|
373
|
+
if (projectNameArg) {
|
|
374
|
+
if ('.' === projectNameArg) return {
|
|
375
|
+
name: node_path.basename(process.cwd()),
|
|
376
|
+
useCurrentDir: true
|
|
377
|
+
};
|
|
378
|
+
return {
|
|
379
|
+
name: projectNameArg,
|
|
380
|
+
useCurrentDir: false
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
const currentDir = process.cwd();
|
|
384
|
+
if (isDirectoryEmpty(currentDir)) return {
|
|
385
|
+
name: node_path.basename(currentDir),
|
|
386
|
+
useCurrentDir: true
|
|
387
|
+
};
|
|
388
|
+
const projectName = await promptInput(i18n.t(localeKeys.prompt.projectName));
|
|
389
|
+
if (!projectName) {
|
|
390
|
+
console.error(i18n.t(localeKeys.error.projectNameEmpty));
|
|
391
|
+
process.exit(1);
|
|
392
|
+
}
|
|
393
|
+
return {
|
|
394
|
+
name: projectName,
|
|
395
|
+
useCurrentDir: false
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
async function main() {
|
|
399
|
+
const args = process.argv.slice(2);
|
|
400
|
+
if (args.includes('--help') || args.includes('-h')) return void showHelp();
|
|
401
|
+
if (args.includes('--version') || args.includes('-v')) return void showVersion();
|
|
402
|
+
if (detectLegacyModernJsFlag(args)) {
|
|
403
|
+
await confirmLegacyModernJsSetup();
|
|
404
|
+
delegateLegacyModernJsSetup(args);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
console.log(`\n${i18n.t(localeKeys.message.welcome)}\n`);
|
|
408
|
+
const { name: projectName, useCurrentDir } = await getProjectName();
|
|
409
|
+
const targetDir = useCurrentDir ? process.cwd() : node_path.isAbsolute(projectName) ? projectName : node_path.resolve(process.cwd(), projectName);
|
|
410
|
+
const generatedPackageName = useCurrentDir || node_path.isAbsolute(projectName) ? node_path.basename(targetDir) : projectName;
|
|
411
|
+
const createPackage = readCreatePackageJson();
|
|
412
|
+
const version = createPackage.version || 'latest';
|
|
413
|
+
const ultramodernPackageVersion = isBleedingDevCreatePackage(createPackage) ? getBleedingDevFrameworkVersion(createPackage, version) : version;
|
|
414
|
+
const addVertical = detectVerticalFlag();
|
|
415
|
+
if (addVertical) {
|
|
416
|
+
const overridePackageSource = args.some((arg)=>arg.startsWith('--ultramodern-package-')) ? detectUltramodernPackageSource(args, ultramodernPackageVersion, createPackage) : void 0;
|
|
417
|
+
addUltramodernVertical({
|
|
418
|
+
workspaceRoot: process.cwd(),
|
|
419
|
+
name: generatedPackageName,
|
|
420
|
+
modernVersion: version,
|
|
421
|
+
enableTailwind: detectExplicitTailwindFlag(),
|
|
422
|
+
packageSource: overridePackageSource
|
|
423
|
+
});
|
|
424
|
+
const dim = '\x1b[2m\x1b[3m';
|
|
425
|
+
const reset = '\x1b[0m';
|
|
426
|
+
console.log(`${i18n.t(localeKeys.message.success)}\n`);
|
|
427
|
+
console.log(`${dim} pnpm check${reset}\n`);
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
if (node_fs.existsSync(targetDir)) {
|
|
431
|
+
const files = node_fs.readdirSync(targetDir);
|
|
432
|
+
if (files.length > 0) {
|
|
433
|
+
console.error(i18n.t(localeKeys.error.directoryExists, {
|
|
434
|
+
projectName
|
|
435
|
+
}));
|
|
436
|
+
process.exit(1);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
const packageSource = resolveWorkspacePackageSource(args, createPackage, detectUltramodernPackageSource(args, ultramodernPackageVersion, createPackage));
|
|
440
|
+
generateUltramodernWorkspace({
|
|
441
|
+
targetDir,
|
|
442
|
+
packageName: generatedPackageName,
|
|
443
|
+
modernVersion: version,
|
|
444
|
+
enableTailwind: detectTailwindFlag(),
|
|
445
|
+
packageSource
|
|
446
|
+
});
|
|
447
|
+
initializeGeneratedGitRepository(targetDir);
|
|
448
|
+
const dim = '\x1b[2m\x1b[3m';
|
|
449
|
+
const reset = '\x1b[0m';
|
|
450
|
+
console.log(`${i18n.t(localeKeys.message.success)}\n`);
|
|
451
|
+
console.log(i18n.t(localeKeys.message.nextSteps));
|
|
452
|
+
if (!useCurrentDir) console.log(`${dim} ${i18n.t(localeKeys.message.step1, {
|
|
453
|
+
projectName
|
|
454
|
+
})}${reset}`);
|
|
455
|
+
console.log(`${dim} ${i18n.t(localeKeys.message.step2)}${reset}`);
|
|
456
|
+
console.log(`${dim} pnpm check${reset}`);
|
|
457
|
+
console.log(`${dim} ${i18n.t(localeKeys.message.step3)}${reset}\n`);
|
|
458
|
+
}
|
|
459
|
+
main().catch((error)=>{
|
|
460
|
+
console.error(i18n.t(localeKeys.error.createFailed), error);
|
|
461
|
+
process.exit(1);
|
|
462
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const EN_LOCALE = {
|
|
3
|
+
prompt: {
|
|
4
|
+
projectName: 'Please enter project name: ',
|
|
5
|
+
legacyModernJsConfirmation: 'Type "{confirmation}" to continue with the original Modern.js setup: '
|
|
6
|
+
},
|
|
7
|
+
error: {
|
|
8
|
+
projectNameEmpty: 'Error: Project name cannot be empty',
|
|
9
|
+
directoryExists: 'Error: Directory "{projectName}" already exists and is not empty',
|
|
10
|
+
legacyModernJsNotConfirmed: 'Aborted. UltraModern.js remains the default unattended setup.',
|
|
11
|
+
createFailed: 'Error creating project:'
|
|
12
|
+
},
|
|
13
|
+
message: {
|
|
14
|
+
welcome: '🚀 Welcome to UltraModern.js',
|
|
15
|
+
success: '✨ Created successfully!',
|
|
16
|
+
nextSteps: '📋 Next steps:',
|
|
17
|
+
step1: 'cd {projectName}',
|
|
18
|
+
step2: 'pnpm install',
|
|
19
|
+
step3: 'pnpm dev',
|
|
20
|
+
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nBRUTAL WARNING: YOU ARE OPTING OUT OF ULTRAMODERN.JS DEFAULTS.\nThe unattended default is the best UltraModern.js configuration:\na structured SuperApp workspace, presetUltramodern, TanStack Router,\nEffect BFF, Tailwind CSS v4, and the BleedingDev package cohort.\nThe original Modern.js setup is a dangerous opt-in path.\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
21
|
+
},
|
|
22
|
+
help: {
|
|
23
|
+
title: '🚀 UltraModern.js Project Creator',
|
|
24
|
+
description: 'Create a new UltraModern.js SuperApp workspace with the full quality baseline by default',
|
|
25
|
+
usage: '📖 Usage:',
|
|
26
|
+
usageExample: ' pnpm dlx @bleedingdev/modern-js-create [project-name] [options]',
|
|
27
|
+
options: '⚙️ Options:',
|
|
28
|
+
optionHelp: ' -h, --help Display this help message',
|
|
29
|
+
optionVersion: ' -v, --version Display version information',
|
|
30
|
+
optionLang: ' -l, --lang Set the language (en default; zh opt-in)',
|
|
31
|
+
optionTailwind: ' --no-tailwind Disable default Tailwind CSS v4 workspace styling',
|
|
32
|
+
optionWorkspace: ' --workspace Use workspace protocol for @modern-js dependencies (for local monorepo testing)',
|
|
33
|
+
optionUltramodernPackageSource: ' --ultramodern-package-source Select UltraModern package source (workspace or install; BleedingDev defaults to install aliases)',
|
|
34
|
+
optionUltramodernPackageScope: ' --ultramodern-package-scope Publish scope for npm alias installs (for example bleedingdev)',
|
|
35
|
+
optionUltramodernPackageNamePrefix: ' --ultramodern-package-name-prefix Prefix for npm alias package names (default: modern-js-)',
|
|
36
|
+
optionVertical: ' --vertical Mutate the current existing UltraModern workspace and wire a MicroVertical named <project-name>',
|
|
37
|
+
optionLegacyModernJs: ' --legacy-modern-js Opt into the original Modern.js setup after a large warning and typed confirmation',
|
|
38
|
+
examples: '💡 Examples:',
|
|
39
|
+
example1: ' pnpm dlx @bleedingdev/modern-js-create my-workspace',
|
|
40
|
+
example2: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --lang zh',
|
|
41
|
+
example3: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --no-tailwind',
|
|
42
|
+
example4: ' pnpm dlx @bleedingdev/modern-js-create --help',
|
|
43
|
+
example5: ' pnpm dlx @bleedingdev/modern-js-create .',
|
|
44
|
+
example6: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --workspace',
|
|
45
|
+
example7: '',
|
|
46
|
+
example8: '',
|
|
47
|
+
example9: '',
|
|
48
|
+
example10: '',
|
|
49
|
+
example11: '',
|
|
50
|
+
example12: ' pnpm dlx @bleedingdev/modern-js-create catalog --vertical',
|
|
51
|
+
moreInfo: '📚 Learn more: https://modernjs.dev'
|
|
52
|
+
},
|
|
53
|
+
version: {
|
|
54
|
+
message: '@bleedingdev/modern-js-create version: {version}'
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export { EN_LOCALE };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { I18n } from "@modern-js/i18n-utils";
|
|
3
|
+
import { EN_LOCALE } from "./en.js";
|
|
4
|
+
import { ZH_LOCALE } from "./zh.js";
|
|
5
|
+
const i18n = new I18n();
|
|
6
|
+
const localeKeys = i18n.init('en', {
|
|
7
|
+
zh: ZH_LOCALE,
|
|
8
|
+
en: EN_LOCALE
|
|
9
|
+
});
|
|
10
|
+
export { i18n, localeKeys };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const ZH_LOCALE = {
|
|
3
|
+
prompt: {
|
|
4
|
+
projectName: '请输入项目名称: ',
|
|
5
|
+
legacyModernJsConfirmation: '输入 "{confirmation}" 以继续使用原始 Modern.js 初始化: '
|
|
6
|
+
},
|
|
7
|
+
error: {
|
|
8
|
+
projectNameEmpty: '错误: 项目名称不能为空',
|
|
9
|
+
directoryExists: '错误: 目录 "{projectName}" 已存在且不为空',
|
|
10
|
+
legacyModernJsNotConfirmed: '已中止。UltraModern.js 仍是默认的免交互初始化方案。',
|
|
11
|
+
createFailed: '创建项目时出错:'
|
|
12
|
+
},
|
|
13
|
+
message: {
|
|
14
|
+
welcome: '🚀 欢迎使用 UltraModern.js',
|
|
15
|
+
success: '✨ 创建成功!',
|
|
16
|
+
nextSteps: '📋 下一步:',
|
|
17
|
+
step1: 'cd {projectName}',
|
|
18
|
+
step2: 'pnpm install',
|
|
19
|
+
step3: 'pnpm dev',
|
|
20
|
+
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n严重警告:你正在退出 ULTRAMODERN.JS 默认配置。\n免交互默认值是最佳 UltraModern.js 配置:\n结构化 SuperApp 工作区、presetUltramodern、TanStack Router、\nEffect BFF、Tailwind CSS v4,以及 BleedingDev 包版本队列。\n原始 Modern.js 初始化是危险的显式选择路径。\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
21
|
+
},
|
|
22
|
+
help: {
|
|
23
|
+
title: '🚀 UltraModern.js 项目创建工具',
|
|
24
|
+
description: '默认创建带完整质量基线的 UltraModern.js SuperApp 工作区',
|
|
25
|
+
usage: '📖 用法:',
|
|
26
|
+
usageExample: ' pnpm dlx @bleedingdev/modern-js-create [项目名称] [选项]',
|
|
27
|
+
options: '⚙️ 选项:',
|
|
28
|
+
optionHelp: ' -h, --help 显示帮助信息',
|
|
29
|
+
optionVersion: ' -v, --version 显示版本信息',
|
|
30
|
+
optionLang: ' -l, --lang 设置语言 (默认 en;zh 需显式选择)',
|
|
31
|
+
optionTailwind: ' --no-tailwind 禁用默认 Tailwind CSS v4 工作区样式',
|
|
32
|
+
optionWorkspace: ' --workspace 对 @modern-js 依赖使用 workspace 协议(用于本地 monorepo 联调)',
|
|
33
|
+
optionUltramodernPackageSource: ' --ultramodern-package-source 选择 UltraModern 依赖来源(workspace 或 install;BleedingDev 默认使用 install alias)',
|
|
34
|
+
optionUltramodernPackageScope: ' --ultramodern-package-scope npm alias 安装使用的发布 scope(例如 bleedingdev)',
|
|
35
|
+
optionUltramodernPackageNamePrefix: ' --ultramodern-package-name-prefix npm alias 包名前缀(默认:modern-js-)',
|
|
36
|
+
optionVertical: ' --vertical 修改当前已有的 UltraModern 工作区,并接入名为 <项目名称> 的 MicroVertical',
|
|
37
|
+
optionLegacyModernJs: ' --legacy-modern-js 在大型警告和输入确认后,选择原始 Modern.js 初始化',
|
|
38
|
+
examples: '💡 示例:',
|
|
39
|
+
example1: ' pnpm dlx @bleedingdev/modern-js-create my-workspace',
|
|
40
|
+
example2: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --lang zh',
|
|
41
|
+
example3: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --no-tailwind',
|
|
42
|
+
example4: ' pnpm dlx @bleedingdev/modern-js-create --help',
|
|
43
|
+
example5: ' pnpm dlx @bleedingdev/modern-js-create .',
|
|
44
|
+
example6: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --workspace',
|
|
45
|
+
example7: '',
|
|
46
|
+
example8: '',
|
|
47
|
+
example9: '',
|
|
48
|
+
example10: '',
|
|
49
|
+
example11: '',
|
|
50
|
+
example12: ' pnpm dlx @bleedingdev/modern-js-create catalog --vertical',
|
|
51
|
+
moreInfo: '📚 更多信息: https://modernjs.dev'
|
|
52
|
+
},
|
|
53
|
+
version: {
|
|
54
|
+
message: '@bleedingdev/modern-js-create 版本: {version}'
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export { ZH_LOCALE };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const WORKSPACE_PACKAGE_VERSION = 'workspace:*';
|
|
3
|
+
const BLEEDINGDEV_CREATE_PACKAGE = '@bleedingdev/modern-js-create';
|
|
4
|
+
const BLEEDINGDEV_PACKAGE_SCOPE = 'bleedingdev';
|
|
5
|
+
const BLEEDINGDEV_PACKAGE_NAME_PREFIX = 'modern-js-';
|
|
6
|
+
const BLEEDINGDEV_FRAMEWORK_VERSION_ENV = 'MODERN_CREATE_ULTRAMODERN_FRAMEWORK_VERSION';
|
|
7
|
+
const ULTRAMODERN_SINGLE_APP_MODERN_PACKAGES = [
|
|
8
|
+
'@modern-js/create',
|
|
9
|
+
'@modern-js/code-tools',
|
|
10
|
+
'@modern-js/runtime',
|
|
11
|
+
'@modern-js/app-tools',
|
|
12
|
+
'@modern-js/tsconfig',
|
|
13
|
+
'@modern-js/plugin-i18n',
|
|
14
|
+
'@modern-js/plugin-tanstack',
|
|
15
|
+
'@modern-js/plugin-bff',
|
|
16
|
+
'@modern-js/adapter-rstest'
|
|
17
|
+
];
|
|
18
|
+
const ULTRAMODERN_WORKSPACE_MODERN_PACKAGES = [
|
|
19
|
+
'@modern-js/create',
|
|
20
|
+
'@modern-js/code-tools',
|
|
21
|
+
'@modern-js/app-tools',
|
|
22
|
+
'@modern-js/plugin-bff',
|
|
23
|
+
'@modern-js/plugin-i18n',
|
|
24
|
+
'@modern-js/plugin-tanstack',
|
|
25
|
+
'@modern-js/runtime'
|
|
26
|
+
];
|
|
27
|
+
function modernPackageVersion(packageSource) {
|
|
28
|
+
return 'install' === packageSource.strategy ? packageSource.modernPackageVersion : WORKSPACE_PACKAGE_VERSION;
|
|
29
|
+
}
|
|
30
|
+
function modernAliasPackageName(packageName, packageSource) {
|
|
31
|
+
if (!packageSource.aliasScope) return packageName;
|
|
32
|
+
const scope = packageSource.aliasScope.replace(/^@/, '');
|
|
33
|
+
const unscopedName = packageName.split('/').at(-1);
|
|
34
|
+
return `@${scope}/${packageSource.aliasPackageNamePrefix ?? ''}${unscopedName}`;
|
|
35
|
+
}
|
|
36
|
+
function modernPackageSpecifier(packageName, packageSource) {
|
|
37
|
+
if ('install' !== packageSource.strategy) return WORKSPACE_PACKAGE_VERSION;
|
|
38
|
+
if (!packageSource.aliasScope) return packageSource.modernPackageVersion;
|
|
39
|
+
return `npm:${modernAliasPackageName(packageName, packageSource)}@${packageSource.modernPackageVersion}`;
|
|
40
|
+
}
|
|
41
|
+
function modernPackageAliases(packageNames, packageSource) {
|
|
42
|
+
if (!packageSource.aliasScope) return;
|
|
43
|
+
return Object.fromEntries(packageNames.map((packageName)=>[
|
|
44
|
+
packageName,
|
|
45
|
+
modernAliasPackageName(packageName, packageSource)
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
function createModernPackagesMetadata(packageNames, packageSource, options = {}) {
|
|
49
|
+
const includeAliases = options.includeAliases ?? Boolean(packageSource.aliasScope);
|
|
50
|
+
const aliases = includeAliases ? modernPackageAliases(packageNames, packageSource) : void 0;
|
|
51
|
+
return {
|
|
52
|
+
packages: [
|
|
53
|
+
...packageNames
|
|
54
|
+
],
|
|
55
|
+
specifier: modernPackageVersion(packageSource),
|
|
56
|
+
...packageSource.registry ? {
|
|
57
|
+
registry: packageSource.registry
|
|
58
|
+
} : {},
|
|
59
|
+
...aliases ? {
|
|
60
|
+
aliases
|
|
61
|
+
} : {}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export { BLEEDINGDEV_CREATE_PACKAGE, BLEEDINGDEV_FRAMEWORK_VERSION_ENV, BLEEDINGDEV_PACKAGE_NAME_PREFIX, BLEEDINGDEV_PACKAGE_SCOPE, ULTRAMODERN_SINGLE_APP_MODERN_PACKAGES, ULTRAMODERN_WORKSPACE_MODERN_PACKAGES, WORKSPACE_PACKAGE_VERSION, createModernPackagesMetadata, modernAliasPackageName, modernPackageAliases, modernPackageSpecifier, modernPackageVersion };
|