@owlmeans/create-app 0.1.18-rc.56 → 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.
Files changed (67) hide show
  1. package/README.md +4 -3
  2. package/build/args/types.d.ts +9 -0
  3. package/build/args/types.d.ts.map +1 -0
  4. package/build/args/types.js +2 -0
  5. package/build/args/types.js.map +1 -0
  6. package/build/args.d.ts +3 -28
  7. package/build/args.d.ts.map +1 -1
  8. package/build/args.js +120 -141
  9. package/build/args.js.map +1 -1
  10. package/build/bin.js +3 -3
  11. package/build/bin.js.map +1 -1
  12. package/build/consts.d.ts +6 -0
  13. package/build/consts.d.ts.map +1 -0
  14. package/build/consts.js +6 -0
  15. package/build/consts.js.map +1 -0
  16. package/build/consts.local.d.ts +12 -0
  17. package/build/consts.local.d.ts.map +1 -0
  18. package/build/consts.local.js +49 -0
  19. package/build/consts.local.js.map +1 -0
  20. package/build/index.d.ts +10 -6
  21. package/build/index.d.ts.map +1 -1
  22. package/build/index.js +4 -3
  23. package/build/index.js.map +1 -1
  24. package/build/naming/types.d.ts +14 -0
  25. package/build/naming/types.d.ts.map +1 -0
  26. package/build/naming/types.js +2 -0
  27. package/build/naming/types.js.map +1 -0
  28. package/build/naming.d.ts +3 -10
  29. package/build/naming.d.ts.map +1 -1
  30. package/build/naming.js +16 -16
  31. package/build/naming.js.map +1 -1
  32. package/build/run.d.ts +1 -1
  33. package/build/run.d.ts.map +1 -1
  34. package/build/run.js +10 -10
  35. package/build/run.js.map +1 -1
  36. package/build/scaffold.d.ts +1 -14
  37. package/build/scaffold.d.ts.map +1 -1
  38. package/build/scaffold.js +6 -5
  39. package/build/scaffold.js.map +1 -1
  40. package/build/template/types.d.ts +16 -0
  41. package/build/template/types.d.ts.map +1 -0
  42. package/build/template/types.js +2 -0
  43. package/build/template/types.js.map +1 -0
  44. package/build/template.d.ts +3 -32
  45. package/build/template.d.ts.map +1 -1
  46. package/build/template.js +68 -91
  47. package/build/template.js.map +1 -1
  48. package/build/types.d.ts +61 -0
  49. package/build/types.d.ts.map +1 -0
  50. package/build/types.js +2 -0
  51. package/build/types.js.map +1 -0
  52. package/package.json +3 -3
  53. package/template/AGENTS.md +10 -1
  54. package/template/README.bare.md +1 -1
  55. package/template/_agents/skills/owlmeans-code-structure/SKILL.md +177 -0
  56. package/template/_agents/skills/reuse-code/SKILL.md +9 -8
  57. package/template/_agents/skills/skill-authoring/SKILL.md +1 -1
  58. package/template/package.json +1 -1
  59. package/template/sources/api/package.json +4 -4
  60. package/template/sources/common/package.json +7 -7
  61. package/template/sources/web/package.json +32 -32
  62. package/template/sources/web/src/consts.ts +11 -0
  63. package/template/sources/web/src/context.ts +1 -3
  64. package/template/sources/web/src/layout/main.tsx +2 -1
  65. package/template/sources/web/src/nav.ts +1 -8
  66. package/template/sources/web/src/screens/session.tsx +2 -1
  67. package/template/sources/web/vite.config.ts +3 -2
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.56 my-app
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 `isEmptyDir(dir)` are
100
- exported for callers that want the pieces; `run(args)` is the full CLI flow.
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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/args/types.ts"],"names":[],"mappings":""}
package/build/args.d.ts CHANGED
@@ -1,29 +1,4 @@
1
- export type PackageManager = 'bun' | 'npm' | 'yarn';
2
- export interface CreateArgs {
3
- /** Target directory (positional). `null` means it must be prompted/derived. */
4
- dir: string | null;
5
- /** Human-readable app name. Defaults to the directory slug. */
6
- name: string | null;
7
- /** Explicit package slug. `null` derives it from the target directory. */
8
- slug: string | null;
9
- /** BCP-47-ish language of the generated UI text and `<html lang>`. */
10
- lang: string;
11
- /** One-line project description for the README, AGENTS.md and the index.html meta tags. */
12
- description: string | null;
13
- /** Scaffold the shell without the example/demo code. */
14
- bare: boolean;
15
- /** Package manager used to install deps and (for `bun`) run the project. */
16
- pm: PackageManager;
17
- /** Install dependencies after copying the template. */
18
- install: boolean;
19
- /** Deploy agent skills via @owlmeans/agent-skills after install. */
20
- skills: boolean;
21
- /** Run `git init` in the new project. */
22
- git: boolean;
23
- /** Skip confirmations / proceed into a non-empty directory. */
24
- yes: boolean;
25
- help: boolean;
26
- }
27
- export declare const parseArgs: (argv: string[]) => CreateArgs | null;
28
- export declare const printHelp: () => void;
1
+ import type { ArgsHelper } from './args/types.js';
2
+ export declare const createArgsHelper: () => ArgsHelper;
3
+ export declare const argsHelper: ArgsHelper;
29
4
  //# sourceMappingURL=args.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAA;AAEnD,MAAM,WAAW,UAAU;IACzB,+EAA+E;IAC/E,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,wDAAwD;IACxD,IAAI,EAAE,OAAO,CAAA;IACb,4EAA4E;IAC5E,EAAE,EAAE,cAAc,CAAA;IAClB,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,MAAM,EAAE,OAAO,CAAA;IACf,yCAAyC;IACzC,GAAG,EAAE,OAAO,CAAA;IACZ,+DAA+D;IAC/D,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;CACd;AA+BD,eAAO,MAAM,SAAS,SAAU,MAAM,EAAE,KAAG,UAAU,GAAG,IAqHvD,CAAA;AAED,eAAO,MAAM,SAAS,QAAO,IAE5B,CAAA"}
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,150 +1,129 @@
1
- import { DEFAULT_LANG, isValidLang, isValidSlug, SLUG_PATTERN } from './naming.js';
2
- const HELP = `@owlmeans/create-app — scaffold a fullstack OwlMeans Common app
3
-
4
- Usage:
5
- npm create @owlmeans/app@latest <dir> [options]
6
- bun create @owlmeans/app <dir> [options]
7
- yarn create @owlmeans/app <dir> [options]
8
- npx @owlmeans/create-app@^0.1.18-rc.56 <dir> [options]
9
-
10
- Generates three workspaces (common + api + web) with shadcn UI navigation and
11
- layout, no authentication, and a session-scoped in-memory resource on the
12
- backend. With --bare the demo is left out and only the working shell remains.
13
- Agent skills are deployed into the project by default.
14
-
15
- Options:
16
- --name <name> human-readable app name (default: derived from <dir>)
17
- --slug <slug> package slug (default: derived from <dir>)
18
- --lang <code> language of the generated UI text (default: ${DEFAULT_LANG})
19
- --description <t> one-line project description for the generated docs
20
- --bare scaffold the shell only — no example/demo code
21
- --pm <bun|npm|yarn> package manager (default: bun)
22
- --no-install do not install dependencies
23
- --no-skills do not deploy agent skills via @owlmeans/agent-skills
24
- --no-git do not run "git init"
25
- --yes, -y proceed without prompts / into a non-empty directory
26
- --help, -h show this help
27
- `;
28
- const PMS = ['bun', 'npm', 'yarn'];
29
- export const parseArgs = (argv) => {
30
- const args = argv.slice(2);
31
- const result = {
32
- dir: null,
33
- name: null,
34
- slug: null,
35
- lang: DEFAULT_LANG,
36
- description: null,
37
- bare: false,
38
- pm: 'bun',
39
- install: true,
40
- skills: true,
41
- git: true,
42
- yes: false,
43
- help: false,
44
- };
45
- // A value may legitimately start with `-` only for free-form text, so `--description`
46
- // takes whatever follows it; the identifier-shaped flags stay strict.
47
- const value = (i, flag, free = false) => {
48
- const v = args[i + 1];
49
- if (v == null || (!free && v.startsWith('-'))) {
50
- process.stderr.write(`error: ${flag} requires a value\n`);
51
- return null;
52
- }
53
- return v;
54
- };
55
- let i = 0;
56
- while (i < args.length) {
57
- const a = args[i];
58
- switch (a) {
59
- case '--help':
60
- case '-h':
61
- result.help = true;
62
- break;
63
- case '--yes':
64
- case '-y':
65
- result.yes = true;
66
- break;
67
- case '--bare':
68
- result.bare = true;
69
- break;
70
- case '--no-install':
71
- result.install = false;
72
- break;
73
- case '--no-skills':
74
- result.skills = false;
75
- break;
76
- case '--no-git':
77
- result.git = false;
78
- break;
79
- case '--name': {
80
- const v = value(i, '--name');
81
- if (v == null)
82
- return null;
83
- result.name = v;
84
- i++;
85
- break;
1
+ import { namingHelper } from './naming.js';
2
+ import { DEFAULT_LANG, SLUG_PATTERN } from './consts.js';
3
+ import { HELP, PMS } from './consts.local.js';
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;
86
28
  }
87
- case '--slug': {
88
- const v = value(i, '--slug');
89
- if (v == null)
90
- return null;
91
- if (!isValidSlug(v)) {
92
- process.stderr.write(`error: --slug must match ${SLUG_PATTERN.source}`
93
- + ' — lowercase letters, digits and inner dashes, 1-32 characters\n');
94
- return null;
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;
95
62
  }
96
- result.slug = v;
97
- i++;
98
- break;
99
- }
100
- case '--lang': {
101
- const v = value(i, '--lang');
102
- if (v == null)
103
- return null;
104
- if (!isValidLang(v)) {
105
- process.stderr.write(`error: --lang must be a language code such as en or pt-BR\n`);
106
- return null;
107
- }
108
- result.lang = v;
109
- i++;
110
- break;
111
- }
112
- case '--description': {
113
- const v = value(i, '--description', true);
114
- if (v == null)
115
- return null;
116
- result.description = v;
117
- i++;
118
- break;
119
- }
120
- case '--pm': {
121
- const v = args[i + 1];
122
- if (v == null || !PMS.includes(v)) {
123
- process.stderr.write(`error: --pm must be one of ${PMS.join(', ')}\n`);
124
- 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;
125
75
  }
126
- result.pm = v;
127
- i++;
128
- break;
129
- }
130
- default:
131
- if (a.startsWith('-')) {
132
- process.stderr.write(`error: unknown flag ${a}\n`);
133
- return null;
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;
134
87
  }
135
- if (result.dir == null) {
136
- result.dir = a;
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;
137
95
  }
138
- else {
139
- process.stderr.write(`error: unexpected argument ${a}\n`);
140
- return null;
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;
141
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++;
142
120
  }
143
- i++;
144
- }
145
- return result;
146
- };
147
- export const printHelp = () => {
148
- process.stdout.write(HELP);
121
+ return result;
122
+ };
123
+ const printHelp = () => {
124
+ process.stdout.write(HELP);
125
+ };
126
+ return { parseArgs, printHelp };
149
127
  };
128
+ export const argsHelper = createArgsHelper();
150
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,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AA8BlF,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;oEAgBuD,YAAY;;;;;;;;;CAS/E,CAAA;AAED,MAAM,GAAG,GAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAEpD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAc,EAAqB,EAAE;IAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC1B,MAAM,MAAM,GAAe;QACzB,GAAG,EAAE,IAAI;QACT,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,KAAK;QACX,EAAE,EAAE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,IAAI,CAAC,CAAA;wBAClD,OAAO,IAAI,CAAA;oBACb,CAAC;oBACD,IAAI,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;wBACvB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAA;oBAChB,CAAC;yBAAM,CAAC;wBACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAA;wBACzD,OAAO,IAAI,CAAA;oBACb,CAAC;YACL,CAAC;YACD,CAAC,EAAE,CAAA;QACL,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,GAAS,EAAE;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAA;IAED,OAAO,EAAE,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 { parseArgs, printHelp } from './args.js';
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,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAEpC,IAAI,IAA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,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"}
@@ -0,0 +1,6 @@
1
+ /** npm-safe package slug: lowercase alphanumerics and inner dashes, 1–32 chars. */
2
+ export declare const SLUG_PATTERN: RegExp;
3
+ /** Loose BCP-47 shape — enough to keep junk out of `<html lang>` without shipping a registry. */
4
+ export declare const LANG_PATTERN: RegExp;
5
+ export declare const DEFAULT_LANG = "en";
6
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,YAAY,QAA2C,CAAA;AAEpE,iGAAiG;AACjG,eAAO,MAAM,YAAY,QAA0C,CAAA;AAEnE,eAAO,MAAM,YAAY,OAAO,CAAA"}
@@ -0,0 +1,6 @@
1
+ /** npm-safe package slug: lowercase alphanumerics and inner dashes, 1–32 chars. */
2
+ export const SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$/;
3
+ /** Loose BCP-47 shape — enough to keep junk out of `<html lang>` without shipping a registry. */
4
+ export const LANG_PATTERN = /^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/;
5
+ export const DEFAULT_LANG = 'en';
6
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG,wCAAwC,CAAA;AAEpE,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GAAG,uCAAuC,CAAA;AAEnE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA"}
@@ -0,0 +1,12 @@
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.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
+ export declare const PMS: PackageManager[];
4
+ /** Dotfiles/dirs are shipped with an underscore prefix so npm does not strip them from the tarball. */
5
+ export declare const DOTFILE_RENAMES: Record<string, string>;
6
+ /** Files whose contents are binary or must not be string-substituted. */
7
+ export declare const BINARY_EXT: Set<string>;
8
+ /** Template-root manifest describing what the bare shell drops and what it swaps in. */
9
+ export declare const BARE_MANIFEST = "_bare.json";
10
+ /** Stand-in for the globstar segment while the single-`*` pass runs; cannot occur in a path. */
11
+ export declare const GLOBSTAR = "\0";
12
+ //# sourceMappingURL=consts.local.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,49 @@
1
+ import { DEFAULT_LANG } from './consts.js';
2
+ export const HELP = `@owlmeans/create-app — scaffold a fullstack OwlMeans Common app
3
+
4
+ Usage:
5
+ npm create @owlmeans/app@latest <dir> [options]
6
+ bun create @owlmeans/app <dir> [options]
7
+ yarn create @owlmeans/app <dir> [options]
8
+ npx @owlmeans/create-app@^0.1.18-rc.58 <dir> [options]
9
+
10
+ Generates three workspaces (common + api + web) with shadcn UI navigation and
11
+ layout, no authentication, and a session-scoped in-memory resource on the
12
+ backend. With --bare the demo is left out and only the working shell remains.
13
+ Agent skills are deployed into the project by default.
14
+
15
+ Options:
16
+ --name <name> human-readable app name (default: derived from <dir>)
17
+ --slug <slug> package slug (default: derived from <dir>)
18
+ --lang <code> language of the generated UI text (default: ${DEFAULT_LANG})
19
+ --description <t> one-line project description for the generated docs
20
+ --bare scaffold the shell only — no example/demo code
21
+ --pm <bun|npm|yarn> package manager (default: bun)
22
+ --no-install do not install dependencies
23
+ --no-skills do not deploy agent skills via @owlmeans/agent-skills
24
+ --no-git do not run "git init"
25
+ --yes, -y proceed without prompts / into a non-empty directory
26
+ --help, -h show this help
27
+ `;
28
+ export const PMS = ['bun', 'npm', 'yarn'];
29
+ /** Dotfiles/dirs are shipped with an underscore prefix so npm does not strip them from the tarball. */
30
+ export const DOTFILE_RENAMES = {
31
+ '_gitignore': '.gitignore',
32
+ '_npmrc': '.npmrc',
33
+ '_env': '.env',
34
+ '_github': '.github',
35
+ // `_agents` carries the canonical harness — AGENTS.md's skills, the shared memory
36
+ // store and the link-skills bridge; the template seed (sync-agent-meta) writes
37
+ // `_agents/skills/` into this tree. `_claude` carries only the Claude Code skill-link
38
+ // bridge (SessionStart hook + the gitkept symlink dir). Entries whose source dir is
39
+ // absent are inert.
40
+ '_agents': '.agents',
41
+ '_claude': '.claude',
42
+ };
43
+ /** Files whose contents are binary or must not be string-substituted. */
44
+ export const BINARY_EXT = new Set(['.ico', '.png', '.jpg', '.jpeg', '.gif', '.webp', '.woff', '.woff2']);
45
+ /** Template-root manifest describing what the bare shell drops and what it swaps in. */
46
+ export const BARE_MANIFEST = '_bare.json';
47
+ /** Stand-in for the globstar segment while the single-`*` pass runs; cannot occur in a path. */
48
+ export const GLOBSTAR = '\u0000';
49
+ //# sourceMappingURL=consts.local.js.map
@@ -0,0 +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,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,9 +1,13 @@
1
1
  export { run } from './run.js';
2
- export { parseArgs, printHelp } from './args.js';
3
- export type { CreateArgs, PackageManager } from './args.js';
2
+ export { argsHelper, createArgsHelper } from './args.js';
3
+ export type { ArgsHelper } from './args/types.js';
4
+ export type { CreateArgs, PackageManager } from './types.js';
4
5
  export { scaffold } from './scaffold.js';
5
- export type { ScaffoldOptions } from './scaffold.js';
6
- export { copyTemplate, templateDir, isEmptyDir } from './template.js';
7
- export type { BareManifest, CopyTemplateOptions, TemplateReplacements } from './template.js';
8
- export { DEFAULT_LANG, defaultDescription, isValidLang, isValidSlug, LANG_PATTERN, SLUG_PATTERN, slugify, titleize } from './naming.js';
6
+ export type { ScaffoldOptions } from './types.js';
7
+ export { createTemplateHelper, templateHelper } from './template.js';
8
+ export type { TemplateHelper } from './template/types.js';
9
+ export type { BareManifest, CopyTemplateOptions, TemplateReplacements } from './types.js';
10
+ export { createNamingHelper, namingHelper } from './naming.js';
11
+ export type { NamingHelper } from './naming/types.js';
12
+ export { DEFAULT_LANG, LANG_PATTERN, SLUG_PATTERN } from './consts.js';
9
13
  //# sourceMappingURL=index.d.ts.map
@@ -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,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E,YAAY,EAAE,MAAM,aAAa,CAAA"}
package/build/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { run } from './run.js';
2
- export { parseArgs, printHelp } from './args.js';
2
+ export { argsHelper, createArgsHelper } from './args.js';
3
3
  export { scaffold } from './scaffold.js';
4
- export { copyTemplate, templateDir, isEmptyDir } from './template.js';
5
- export { DEFAULT_LANG, defaultDescription, isValidLang, isValidSlug, LANG_PATTERN, SLUG_PATTERN, slugify, titleize } from './naming.js';
4
+ export { createTemplateHelper, templateHelper } from './template.js';
5
+ export { createNamingHelper, namingHelper } from './naming.js';
6
+ export { DEFAULT_LANG, LANG_PATTERN, SLUG_PATTERN } from './consts.js';
6
7
  //# sourceMappingURL=index.js.map
@@ -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,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAErE,OAAO,EACL,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAC1G,MAAM,aAAa,CAAA"}
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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/naming/types.ts"],"names":[],"mappings":""}
package/build/naming.d.ts CHANGED
@@ -1,11 +1,4 @@
1
- /** npm-safe package slug: lowercase alphanumerics and inner dashes, 1–32 chars. */
2
- export declare const SLUG_PATTERN: RegExp;
3
- /** Loose BCP-47 shape — enough to keep junk out of `<html lang>` without shipping a registry. */
4
- export declare const LANG_PATTERN: RegExp;
5
- export declare const DEFAULT_LANG = "en";
6
- export declare const isValidSlug: (slug: string) => boolean;
7
- export declare const isValidLang: (lang: string) => boolean;
8
- export declare const slugify: (input: string) => string;
9
- export declare const titleize: (slug: string) => string;
10
- 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;
11
4
  //# sourceMappingURL=naming.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,eAAO,MAAM,YAAY,QAA2C,CAAA;AAEpE,iGAAiG;AACjG,eAAO,MAAM,YAAY,QAA0C,CAAA;AAEnE,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,OAAkC,CAAA;AAE7E,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,OAAkC,CAAA;AAE7E,eAAO,MAAM,OAAO,UAAW,MAAM,KAAG,MAOnB,CAAA;AAErB,eAAO,MAAM,QAAQ,SAAU,MAAM,KAAG,MAC6C,CAAA;AAErF,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,MACJ,CAAA"}
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"}