@praxis-framework/seed 0.7.0 → 0.7.1

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.
@@ -3,11 +3,13 @@
3
3
  *
4
4
  * Resolution order:
5
5
  * 1. Explicit override (`override` arg).
6
- * 2. `<package-root>/template/` — for when a published build bundles the
7
- * template alongside the compiled JS (out of scope for the v0 monorepo
8
- * layout, but supported so we don't paint ourselves into a corner).
9
- * 3. Walk up from the package directory looking for a `template/` sibling.
10
- * Handles the monorepo-dev case: `packages/seed/dist/` `packages/seed/`
6
+ * 2. `<here>/template/` — the bundled location. The build copies the
7
+ * scaffolding to `dist/template/`, so in a published/compiled install
8
+ * `here` is `dist/` and this resolves the shipped template.
9
+ * 3. `<package-root>/template/` for when a published build bundles the
10
+ * template alongside the package root rather than next to the compiled JS.
11
+ * 4. Walk up from the package directory looking for a `template/` sibling.
12
+ * Handles the monorepo-dev case: `packages/seed/src/` → `packages/seed/`
11
13
  * → `packages//` → repo-root, where `template/` lives.
12
14
  *
13
15
  * Throws `SeedError('TEMPLATE_MISSING')` if nothing matches.
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA+B7D"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAqC7D"}
package/dist/template.js CHANGED
@@ -7,11 +7,13 @@ import { SeedError } from './types.js';
7
7
  *
8
8
  * Resolution order:
9
9
  * 1. Explicit override (`override` arg).
10
- * 2. `<package-root>/template/` — for when a published build bundles the
11
- * template alongside the compiled JS (out of scope for the v0 monorepo
12
- * layout, but supported so we don't paint ourselves into a corner).
13
- * 3. Walk up from the package directory looking for a `template/` sibling.
14
- * Handles the monorepo-dev case: `packages/seed/dist/` `packages/seed/`
10
+ * 2. `<here>/template/` — the bundled location. The build copies the
11
+ * scaffolding to `dist/template/`, so in a published/compiled install
12
+ * `here` is `dist/` and this resolves the shipped template.
13
+ * 3. `<package-root>/template/` for when a published build bundles the
14
+ * template alongside the package root rather than next to the compiled JS.
15
+ * 4. Walk up from the package directory looking for a `template/` sibling.
16
+ * Handles the monorepo-dev case: `packages/seed/src/` → `packages/seed/`
15
17
  * → `packages//` → repo-root, where `template/` lives.
16
18
  *
17
19
  * Throws `SeedError('TEMPLATE_MISSING')` if nothing matches.
@@ -26,6 +28,11 @@ export function resolveTemplatePath(override) {
26
28
  // src/template.ts (dev) → src/ → packages/seed/
27
29
  // dist/template.js (build) → dist/ → packages/seed/
28
30
  const here = fileURLToPath(new URL('.', import.meta.url));
31
+ // Bundled location: the build copies the scaffolding to dist/template/, so
32
+ // in a compiled install `here` is dist/ and this is the shipped template.
33
+ const shipped = path.join(here, 'template');
34
+ if (existsSync(shipped))
35
+ return shipped;
29
36
  const packageRoot = path.resolve(here, '..');
30
37
  const bundled = path.join(packageRoot, 'template');
31
38
  if (existsSync(bundled))
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAiB;IACnD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CAAC,0C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AAC,MAAM,CAAC,CAAC;QACpC,IAAI,MAAM,KAAK,MAAM;YAAE,MAAM;QAC7B,MAAM,GAAG,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,SAAS,CACjB,gGAAgG,EAChG,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxis-framework/seed",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Shared role-seeding logic — writes a populated praxis role from a template into a target directory",
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "files": [
16
16
  "dist",
17
- "template",
18
17
  "README.md"
19
18
  ],
20
19
  "repository": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes