@owlmeans/create-app 0.1.18-rc.57 → 0.1.18-rc.58
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 +4 -3
- package/build/args/types.d.ts +9 -0
- package/build/args/types.d.ts.map +1 -0
- package/build/args/types.js +2 -0
- package/build/args/types.js.map +1 -0
- package/build/args.d.ts +3 -3
- package/build/args.d.ts.map +1 -1
- package/build/args.js +118 -114
- package/build/args.js.map +1 -1
- package/build/bin.js +3 -3
- package/build/bin.js.map +1 -1
- package/build/consts.local.d.ts +1 -1
- package/build/consts.local.d.ts.map +1 -1
- package/build/consts.local.js +1 -2
- package/build/consts.local.js.map +1 -1
- package/build/index.d.ts +6 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/naming/types.d.ts +14 -0
- package/build/naming/types.d.ts.map +1 -0
- package/build/naming/types.js +2 -0
- package/build/naming/types.js.map +1 -0
- package/build/naming.d.ts +3 -5
- package/build/naming.d.ts.map +1 -1
- package/build/naming.js +15 -11
- package/build/naming.js.map +1 -1
- package/build/run.js +10 -10
- package/build/run.js.map +1 -1
- package/build/scaffold.js +5 -5
- package/build/scaffold.js.map +1 -1
- package/build/template/types.d.ts +16 -0
- package/build/template/types.d.ts.map +1 -0
- package/build/template/types.js +2 -0
- package/build/template/types.js.map +1 -0
- package/build/template.d.ts +3 -13
- package/build/template.d.ts.map +1 -1
- package/build/template.js +67 -71
- package/build/template.js.map +1 -1
- package/package.json +2 -2
- package/template/AGENTS.md +7 -5
- package/template/README.bare.md +1 -1
- package/template/_agents/skills/owlmeans-code-structure/SKILL.md +139 -91
- package/template/_agents/skills/reuse-code/SKILL.md +9 -9
- package/template/_claude/settings.json +0 -11
- package/template/package.json +1 -3
- package/template/sources/api/package.json +3 -3
- package/template/sources/common/package.json +5 -5
- package/template/sources/web/package.json +11 -11
- package/template/_owlmeans-structure.json +0 -12
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ bun create @owlmeans/app my-app
|
|
|
9
9
|
# or
|
|
10
10
|
yarn create @owlmeans/app my-app
|
|
11
11
|
# or
|
|
12
|
-
npx @owlmeans/create-app@^0.1.18-rc.
|
|
12
|
+
npx @owlmeans/create-app@^0.1.18-rc.58 my-app
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## What it generates
|
|
@@ -96,8 +96,9 @@ scaffold({
|
|
|
96
96
|
})
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
`templateDir()`, `copyTemplate(src, dest, replacements, { bare })` and
|
|
100
|
-
exported for callers that want the pieces
|
|
99
|
+
`templateHelper.templateDir()`, `templateHelper.copyTemplate(src, dest, replacements, { bare })` and
|
|
100
|
+
`templateHelper.isEmptyDir(dir)` are exported for callers that want the pieces (`namingHelper` and
|
|
101
|
+
`argsHelper` likewise); `run(args)` is the full CLI flow.
|
|
101
102
|
|
|
102
103
|
## Running the generated app
|
|
103
104
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CreateArgs } from '../types.js';
|
|
2
|
+
/** The scaffolder CLI's command line. */
|
|
3
|
+
export interface ArgsHelper {
|
|
4
|
+
/** The options of a process argv, or `null` (after an error on stderr) for an unusable one. */
|
|
5
|
+
parseArgs: (argv: string[]) => CreateArgs | null;
|
|
6
|
+
/** Print the usage text to stdout. */
|
|
7
|
+
printHelp: () => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/args/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,yCAAyC;AACzC,MAAM,WAAW,UAAU;IACzB,+FAA+F;IAC/F,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,UAAU,GAAG,IAAI,CAAA;IAChD,sCAAsC;IACtC,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/args/types.ts"],"names":[],"mappings":""}
|
package/build/args.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import type { ArgsHelper } from './args/types.js';
|
|
2
|
+
export declare const createArgsHelper: () => ArgsHelper;
|
|
3
|
+
export declare const argsHelper: ArgsHelper;
|
|
4
4
|
//# sourceMappingURL=args.d.ts.map
|
package/build/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO,MAAM,gBAAgB,QAAO,UA6HnC,CAAA;AAED,eAAO,MAAM,UAAU,YAAqB,CAAA"}
|
package/build/args.js
CHANGED
|
@@ -1,125 +1,129 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { namingHelper } from './naming.js';
|
|
2
2
|
import { DEFAULT_LANG, SLUG_PATTERN } from './consts.js';
|
|
3
3
|
import { HELP, PMS } from './consts.local.js';
|
|
4
|
-
export const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return v;
|
|
29
|
-
};
|
|
30
|
-
let i = 0;
|
|
31
|
-
while (i < args.length) {
|
|
32
|
-
const a = args[i];
|
|
33
|
-
switch (a) {
|
|
34
|
-
case '--help':
|
|
35
|
-
case '-h':
|
|
36
|
-
result.help = true;
|
|
37
|
-
break;
|
|
38
|
-
case '--yes':
|
|
39
|
-
case '-y':
|
|
40
|
-
result.yes = true;
|
|
41
|
-
break;
|
|
42
|
-
case '--bare':
|
|
43
|
-
result.bare = true;
|
|
44
|
-
break;
|
|
45
|
-
case '--no-install':
|
|
46
|
-
result.install = false;
|
|
47
|
-
break;
|
|
48
|
-
case '--no-skills':
|
|
49
|
-
result.skills = false;
|
|
50
|
-
break;
|
|
51
|
-
case '--no-git':
|
|
52
|
-
result.git = false;
|
|
53
|
-
break;
|
|
54
|
-
case '--name': {
|
|
55
|
-
const v = value(i, '--name');
|
|
56
|
-
if (v == null)
|
|
57
|
-
return null;
|
|
58
|
-
result.name = v;
|
|
59
|
-
i++;
|
|
60
|
-
break;
|
|
4
|
+
export const createArgsHelper = () => {
|
|
5
|
+
const parseArgs = (argv) => {
|
|
6
|
+
const args = argv.slice(2);
|
|
7
|
+
const result = {
|
|
8
|
+
dir: null,
|
|
9
|
+
name: null,
|
|
10
|
+
slug: null,
|
|
11
|
+
lang: DEFAULT_LANG,
|
|
12
|
+
description: null,
|
|
13
|
+
bare: false,
|
|
14
|
+
pm: 'bun',
|
|
15
|
+
install: true,
|
|
16
|
+
skills: true,
|
|
17
|
+
git: true,
|
|
18
|
+
yes: false,
|
|
19
|
+
help: false,
|
|
20
|
+
};
|
|
21
|
+
// A value may legitimately start with `-` only for free-form text, so `--description`
|
|
22
|
+
// takes whatever follows it; the identifier-shaped flags stay strict.
|
|
23
|
+
const value = (i, flag, free = false) => {
|
|
24
|
+
const v = args[i + 1];
|
|
25
|
+
if (v == null || (!free && v.startsWith('-'))) {
|
|
26
|
+
process.stderr.write(`error: ${flag} requires a value\n`);
|
|
27
|
+
return null;
|
|
61
28
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
29
|
+
return v;
|
|
30
|
+
};
|
|
31
|
+
let i = 0;
|
|
32
|
+
while (i < args.length) {
|
|
33
|
+
const a = args[i];
|
|
34
|
+
switch (a) {
|
|
35
|
+
case '--help':
|
|
36
|
+
case '-h':
|
|
37
|
+
result.help = true;
|
|
38
|
+
break;
|
|
39
|
+
case '--yes':
|
|
40
|
+
case '-y':
|
|
41
|
+
result.yes = true;
|
|
42
|
+
break;
|
|
43
|
+
case '--bare':
|
|
44
|
+
result.bare = true;
|
|
45
|
+
break;
|
|
46
|
+
case '--no-install':
|
|
47
|
+
result.install = false;
|
|
48
|
+
break;
|
|
49
|
+
case '--no-skills':
|
|
50
|
+
result.skills = false;
|
|
51
|
+
break;
|
|
52
|
+
case '--no-git':
|
|
53
|
+
result.git = false;
|
|
54
|
+
break;
|
|
55
|
+
case '--name': {
|
|
56
|
+
const v = value(i, '--name');
|
|
57
|
+
if (v == null)
|
|
58
|
+
return null;
|
|
59
|
+
result.name = v;
|
|
60
|
+
i++;
|
|
61
|
+
break;
|
|
70
62
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
result.lang = v;
|
|
84
|
-
i++;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
case '--description': {
|
|
88
|
-
const v = value(i, '--description', true);
|
|
89
|
-
if (v == null)
|
|
90
|
-
return null;
|
|
91
|
-
result.description = v;
|
|
92
|
-
i++;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case '--pm': {
|
|
96
|
-
const v = args[i + 1];
|
|
97
|
-
if (v == null || !PMS.includes(v)) {
|
|
98
|
-
process.stderr.write(`error: --pm must be one of ${PMS.join(', ')}\n`);
|
|
99
|
-
return null;
|
|
63
|
+
case '--slug': {
|
|
64
|
+
const v = value(i, '--slug');
|
|
65
|
+
if (v == null)
|
|
66
|
+
return null;
|
|
67
|
+
if (!namingHelper.isValidSlug(v)) {
|
|
68
|
+
process.stderr.write(`error: --slug must match ${SLUG_PATTERN.source}`
|
|
69
|
+
+ ' — lowercase letters, digits and inner dashes, 1-32 characters\n');
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
result.slug = v;
|
|
73
|
+
i++;
|
|
74
|
+
break;
|
|
100
75
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
76
|
+
case '--lang': {
|
|
77
|
+
const v = value(i, '--lang');
|
|
78
|
+
if (v == null)
|
|
79
|
+
return null;
|
|
80
|
+
if (!namingHelper.isValidLang(v)) {
|
|
81
|
+
process.stderr.write(`error: --lang must be a language code such as en or pt-BR\n`);
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
result.lang = v;
|
|
85
|
+
i++;
|
|
86
|
+
break;
|
|
109
87
|
}
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
case '--description': {
|
|
89
|
+
const v = value(i, '--description', true);
|
|
90
|
+
if (v == null)
|
|
91
|
+
return null;
|
|
92
|
+
result.description = v;
|
|
93
|
+
i++;
|
|
94
|
+
break;
|
|
112
95
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
96
|
+
case '--pm': {
|
|
97
|
+
const v = args[i + 1];
|
|
98
|
+
if (v == null || !PMS.includes(v)) {
|
|
99
|
+
process.stderr.write(`error: --pm must be one of ${PMS.join(', ')}\n`);
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
result.pm = v;
|
|
103
|
+
i++;
|
|
104
|
+
break;
|
|
116
105
|
}
|
|
106
|
+
default:
|
|
107
|
+
if (a.startsWith('-')) {
|
|
108
|
+
process.stderr.write(`error: unknown flag ${a}\n`);
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (result.dir == null) {
|
|
112
|
+
result.dir = a;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
process.stderr.write(`error: unexpected argument ${a}\n`);
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
i++;
|
|
117
120
|
}
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
return result;
|
|
122
|
+
};
|
|
123
|
+
const printHelp = () => {
|
|
124
|
+
process.stdout.write(HELP);
|
|
125
|
+
};
|
|
126
|
+
return { parseArgs, printHelp };
|
|
124
127
|
};
|
|
128
|
+
export const argsHelper = createArgsHelper();
|
|
125
129
|
//# sourceMappingURL=args.js.map
|
package/build/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAI7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAe,EAAE;IAC/C,MAAM,SAAS,GAAG,CAAC,IAAc,EAAqB,EAAE;QACtD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAC1B,MAAM,MAAM,GAAe;YACzB,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,KAAK;YACX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,SAAS,EAAE,SAAS,EAAE,CAAA;AACjC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAA"}
|
package/build/bin.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { argsHelper } from './args.js';
|
|
3
3
|
import { run } from './run.js';
|
|
4
|
-
const args = parseArgs(process.argv);
|
|
4
|
+
const args = argsHelper.parseArgs(process.argv);
|
|
5
5
|
if (args == null) {
|
|
6
6
|
process.stderr.write('Run with --help for usage.\n');
|
|
7
7
|
process.exit(2);
|
|
8
8
|
}
|
|
9
9
|
else if (args.help) {
|
|
10
|
-
printHelp();
|
|
10
|
+
argsHelper.printHelp();
|
|
11
11
|
process.exit(0);
|
|
12
12
|
}
|
|
13
13
|
else {
|
package/build/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAE/C,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;KAAM,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,UAAU,CAAC,SAAS,EAAE,CAAA;IACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;KAAM,CAAC;IACN,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACpB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACpF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/build/consts.local.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PackageManager } from './types.js';
|
|
2
|
-
export declare const HELP = "@owlmeans/create-app \u2014 scaffold a fullstack OwlMeans Common app\n\nUsage:\n npm create @owlmeans/app@latest <dir> [options]\n bun create @owlmeans/app <dir> [options]\n yarn create @owlmeans/app <dir> [options]\n npx @owlmeans/create-app@^0.1.18-rc.
|
|
2
|
+
export declare const HELP = "@owlmeans/create-app \u2014 scaffold a fullstack OwlMeans Common app\n\nUsage:\n npm create @owlmeans/app@latest <dir> [options]\n bun create @owlmeans/app <dir> [options]\n yarn create @owlmeans/app <dir> [options]\n npx @owlmeans/create-app@^0.1.18-rc.58 <dir> [options]\n\nGenerates three workspaces (common + api + web) with shadcn UI navigation and\nlayout, no authentication, and a session-scoped in-memory resource on the\nbackend. With --bare the demo is left out and only the working shell remains.\nAgent skills are deployed into the project by default.\n\nOptions:\n --name <name> human-readable app name (default: derived from <dir>)\n --slug <slug> package slug (default: derived from <dir>)\n --lang <code> language of the generated UI text (default: en)\n --description <t> one-line project description for the generated docs\n --bare scaffold the shell only \u2014 no example/demo code\n --pm <bun|npm|yarn> package manager (default: bun)\n --no-install do not install dependencies\n --no-skills do not deploy agent skills via @owlmeans/agent-skills\n --no-git do not run \"git init\"\n --yes, -y proceed without prompts / into a non-empty directory\n --help, -h show this help\n";
|
|
3
3
|
export declare const PMS: PackageManager[];
|
|
4
4
|
/** Dotfiles/dirs are shipped with an underscore prefix so npm does not strip them from the tarball. */
|
|
5
5
|
export declare const DOTFILE_RENAMES: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,eAAO,MAAM,IAAI,6wCAyBhB,CAAA;AAED,eAAO,MAAM,GAAG,EAAE,cAAc,EAA2B,CAAA;AAE3D,uGAAuG;AACvG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,eAAO,MAAM,IAAI,6wCAyBhB,CAAA;AAED,eAAO,MAAM,GAAG,EAAE,cAAc,EAA2B,CAAA;AAE3D,uGAAuG;AACvG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAYlD,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,UAAU,aAAiF,CAAA;AAExG,wFAAwF;AACxF,eAAO,MAAM,aAAa,eAAe,CAAA;AAEzC,gGAAgG;AAChG,eAAO,MAAM,QAAQ,OAAW,CAAA"}
|
package/build/consts.local.js
CHANGED
|
@@ -5,7 +5,7 @@ Usage:
|
|
|
5
5
|
npm create @owlmeans/app@latest <dir> [options]
|
|
6
6
|
bun create @owlmeans/app <dir> [options]
|
|
7
7
|
yarn create @owlmeans/app <dir> [options]
|
|
8
|
-
npx @owlmeans/create-app@^0.1.18-rc.
|
|
8
|
+
npx @owlmeans/create-app@^0.1.18-rc.58 <dir> [options]
|
|
9
9
|
|
|
10
10
|
Generates three workspaces (common + api + web) with shadcn UI navigation and
|
|
11
11
|
layout, no authentication, and a session-scoped in-memory resource on the
|
|
@@ -32,7 +32,6 @@ export const DOTFILE_RENAMES = {
|
|
|
32
32
|
'_npmrc': '.npmrc',
|
|
33
33
|
'_env': '.env',
|
|
34
34
|
'_github': '.github',
|
|
35
|
-
'_owlmeans-structure.json': '.owlmeans-structure.json',
|
|
36
35
|
// `_agents` carries the canonical harness — AGENTS.md's skills, the shared memory
|
|
37
36
|
// store and the link-skills bridge; the template seed (sync-agent-meta) writes
|
|
38
37
|
// `_agents/skills/` into this tree. `_claude` carries only the Claude Code skill-link
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,MAAM,CAAC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;oEAgBgD,YAAY;;;;;;;;;CAS/E,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAE3D,uGAAuG;AACvG,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,SAAS;IACpB,
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,MAAM,CAAC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;oEAgBgD,YAAY;;;;;;;;;CAS/E,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAE3D,uGAAuG;AACvG,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,SAAS;IACpB,kFAAkF;IAClF,+EAA+E;IAC/E,sFAAsF;IACtF,oFAAoF;IACpF,oBAAoB;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;CACrB,CAAA;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;AAExG,wFAAwF;AACxF,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAA;AAEzC,gGAAgG;AAChG,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { run } from './run.js';
|
|
2
|
-
export {
|
|
2
|
+
export { argsHelper, createArgsHelper } from './args.js';
|
|
3
|
+
export type { ArgsHelper } from './args/types.js';
|
|
3
4
|
export type { CreateArgs, PackageManager } from './types.js';
|
|
4
5
|
export { scaffold } from './scaffold.js';
|
|
5
6
|
export type { ScaffoldOptions } from './types.js';
|
|
6
|
-
export {
|
|
7
|
+
export { createTemplateHelper, templateHelper } from './template.js';
|
|
8
|
+
export type { TemplateHelper } from './template/types.js';
|
|
7
9
|
export type { BareManifest, CopyTemplateOptions, TemplateReplacements } from './types.js';
|
|
8
|
-
export {
|
|
10
|
+
export { createNamingHelper, namingHelper } from './naming.js';
|
|
11
|
+
export type { NamingHelper } from './naming/types.js';
|
|
9
12
|
export { DEFAULT_LANG, LANG_PATTERN, SLUG_PATTERN } from './consts.js';
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACpE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACzF,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC9D,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { run } from './run.js';
|
|
2
|
-
export {
|
|
2
|
+
export { argsHelper, createArgsHelper } from './args.js';
|
|
3
3
|
export { scaffold } from './scaffold.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { createTemplateHelper, templateHelper } from './template.js';
|
|
5
|
+
export { createNamingHelper, namingHelper } from './naming.js';
|
|
6
6
|
export { DEFAULT_LANG, LANG_PATTERN, SLUG_PATTERN } from './consts.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAGxD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGpE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The names a scaffolded app is given: its package slug, language, title and description. */
|
|
2
|
+
export interface NamingHelper {
|
|
3
|
+
/** Whether a string is an npm-safe package slug (`SLUG_PATTERN`). */
|
|
4
|
+
isValidSlug: (slug: string) => boolean;
|
|
5
|
+
/** Whether a string has the loose BCP-47 shape of `LANG_PATTERN`. */
|
|
6
|
+
isValidLang: (lang: string) => boolean;
|
|
7
|
+
/** A package slug derived from a target directory; `owlmeans-app` when nothing usable is left. */
|
|
8
|
+
slugify: (input: string) => string;
|
|
9
|
+
/** `my-app` → `My App`. */
|
|
10
|
+
titleize: (slug: string) => string;
|
|
11
|
+
/** The one-line description an app gets when none is given. */
|
|
12
|
+
defaultDescription: (name: string) => string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/naming/types.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,MAAM,WAAW,YAAY;IAC3B,qEAAqE;IACrE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACtC,qEAAqE;IACrE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACtC,kGAAkG;IAClG,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,2BAA2B;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,+DAA+D;IAC/D,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/naming/types.ts"],"names":[],"mappings":""}
|
package/build/naming.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const titleize: (slug: string) => string;
|
|
5
|
-
export declare const defaultDescription: (name: string) => string;
|
|
1
|
+
import type { NamingHelper } from './naming/types.js';
|
|
2
|
+
export declare const createNamingHelper: () => NamingHelper;
|
|
3
|
+
export declare const namingHelper: NamingHelper;
|
|
6
4
|
//# sourceMappingURL=naming.d.ts.map
|
package/build/naming.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,kBAAkB,QAAO,YAqBrC,CAAA;AAED,eAAO,MAAM,YAAY,cAAuB,CAAA"}
|
package/build/naming.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { basename } from 'node:path';
|
|
2
2
|
import { LANG_PATTERN, SLUG_PATTERN } from './consts.js';
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export const createNamingHelper = () => {
|
|
4
|
+
const isValidSlug = (slug) => SLUG_PATTERN.test(slug);
|
|
5
|
+
const isValidLang = (lang) => LANG_PATTERN.test(lang);
|
|
6
|
+
const slugify = (input) => basename(input)
|
|
7
|
+
.toLowerCase()
|
|
8
|
+
.replace(/[^a-z0-9-]+/g, '-')
|
|
9
|
+
.replace(/^-+/g, '')
|
|
10
|
+
.slice(0, 32)
|
|
11
|
+
.replace(/-+$/g, '')
|
|
12
|
+
|| 'owlmeans-app';
|
|
13
|
+
const titleize = (slug) => slug.split('-').filter(Boolean).map(w => w[0].toUpperCase() + w.slice(1)).join(' ');
|
|
14
|
+
const defaultDescription = (name) => `${name} — a fullstack OwlMeans Common app.`;
|
|
15
|
+
return { isValidSlug, isValidLang, slugify, titleize, defaultDescription };
|
|
16
|
+
};
|
|
17
|
+
export const namingHelper = createNamingHelper();
|
|
14
18
|
//# sourceMappingURL=naming.js.map
|
package/build/naming.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming.js","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"naming.js","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAGxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAiB,EAAE;IACnD,MAAM,WAAW,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEtE,MAAM,WAAW,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEtE,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CACxC,QAAQ,CAAC,KAAK,CAAC;SACZ,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;SACnB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SACZ,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;WACjB,cAAc,CAAA;IAErB,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE,CACxC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAErF,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAU,EAAE,CAClD,GAAG,IAAI,qCAAqC,CAAA;IAE9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAA;AAC5E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAA"}
|
package/build/run.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { run as installSkills } from '@owlmeans/agent-skills';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { namingHelper } from './naming.js';
|
|
5
|
+
import { templateHelper } from './template.js';
|
|
6
6
|
const installArgs = (pm) => pm === 'yarn' ? [] : ['install'];
|
|
7
7
|
const log = (msg) => { process.stdout.write(msg + '\n'); };
|
|
8
8
|
export const run = async (args) => {
|
|
@@ -11,20 +11,20 @@ export const run = async (args) => {
|
|
|
11
11
|
return 2;
|
|
12
12
|
}
|
|
13
13
|
const dest = resolve(args.dir);
|
|
14
|
-
const slug = args.slug ?? slugify(args.dir);
|
|
15
|
-
if (!isValidSlug(slug)) {
|
|
14
|
+
const slug = args.slug ?? namingHelper.slugify(args.dir);
|
|
15
|
+
if (!namingHelper.isValidSlug(slug)) {
|
|
16
16
|
process.stderr.write(`error: cannot derive a package slug from "${args.dir}" (got "${slug}")`
|
|
17
17
|
+ ' — pass one with --slug\n');
|
|
18
18
|
return 2;
|
|
19
19
|
}
|
|
20
|
-
const name = args.name ?? titleize(slug);
|
|
21
|
-
const description = args.description ?? defaultDescription(name);
|
|
22
|
-
if (!isEmptyDir(dest) && !args.yes) {
|
|
20
|
+
const name = args.name ?? namingHelper.titleize(slug);
|
|
21
|
+
const description = args.description ?? namingHelper.defaultDescription(name);
|
|
22
|
+
if (!templateHelper.isEmptyDir(dest) && !args.yes) {
|
|
23
23
|
process.stderr.write(`error: ${dest} is not empty. Re-run with --yes to scaffold into it anyway.\n`);
|
|
24
24
|
return 1;
|
|
25
25
|
}
|
|
26
26
|
log(`\nScaffolding OwlMeans app "${name}" into ${dest}\n`);
|
|
27
|
-
copyTemplate(templateDir(), dest, { slug, name, lang: args.lang, description }, { bare: args.bare });
|
|
27
|
+
templateHelper.copyTemplate(templateHelper.templateDir(), dest, { slug, name, lang: args.lang, description }, { bare: args.bare });
|
|
28
28
|
log(args.bare
|
|
29
29
|
? ' ✓ template copied (common + api + web, bare shell)'
|
|
30
30
|
: ' ✓ template copied (common + api + web)');
|
|
@@ -50,7 +50,7 @@ export const run = async (args) => {
|
|
|
50
50
|
log(args.install
|
|
51
51
|
? '\nDeploying agent skills via @owlmeans/agent-skills…'
|
|
52
52
|
: '\nDeploying harness guidance via @owlmeans/agent-skills (general skills only — re-run'
|
|
53
|
-
+ '\n`npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
53
|
+
+ '\n`npx @owlmeans/agent-skills@^0.1.18-rc.49` after installing to add the package-specific ones)…');
|
|
54
54
|
try {
|
|
55
55
|
const result = await installSkills({
|
|
56
56
|
dir: dest,
|
|
@@ -62,7 +62,7 @@ export const run = async (args) => {
|
|
|
62
62
|
help: false,
|
|
63
63
|
});
|
|
64
64
|
if (result.code !== 0) {
|
|
65
|
-
process.stderr.write(` agent-skills exited with code ${result.code} — you can re-run \`npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
65
|
+
process.stderr.write(` agent-skills exited with code ${result.code} — you can re-run \`npx @owlmeans/agent-skills@^0.1.18-rc.49\` later.\n`);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
catch (err) {
|
package/build/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAA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