@_linked/cli 1.8.0 → 1.8.2
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/.github/workflows/publish.yml +13 -1
- package/CHANGELOG.md +42 -0
- package/defaults/app-with-backend/.env.example +20 -0
- package/defaults/app-with-backend/gitignore.template +3 -1
- package/defaults/app-with-backend/linked.config.js +2 -0
- package/defaults/app-with-backend/package.json +12 -7
- package/defaults/app-with-backend/vite.config.ts +13 -0
- package/defaults/setup-publish/dual-branch/github/workflows/publish.yml +52 -23
- package/defaults/setup-publish/github/workflows/publish.yml +16 -1
- package/defaults/shape.ts +8 -2
- package/lib/cjs/cli-methods.d.ts +11 -3
- package/lib/cjs/cli-methods.d.ts.map +1 -1
- package/lib/cjs/cli-methods.js +55 -118
- package/lib/cjs/cli-methods.js.map +1 -1
- package/lib/cjs/cli.js +30 -6
- package/lib/cjs/cli.js.map +1 -1
- package/lib/cjs/commands/setup-publish.js +12 -0
- package/lib/cjs/commands/setup-publish.js.map +1 -1
- package/lib/cjs/commands/start.d.ts +6 -0
- package/lib/cjs/commands/start.d.ts.map +1 -0
- package/lib/cjs/commands/start.js +337 -0
- package/lib/cjs/commands/start.js.map +1 -0
- package/lib/cjs/config-webpack-app.d.ts +1 -1
- package/lib/cjs/config-webpack-app.d.ts.map +1 -1
- package/lib/cjs/config-webpack-app.js +1 -1
- package/lib/cjs/config-webpack-app.js.map +1 -1
- package/lib/cjs/config-webpack.d.ts +1 -1
- package/lib/cjs/config-webpack.d.ts.map +1 -1
- package/lib/cjs/config-webpack.js +10 -10
- package/lib/cjs/config-webpack.js.map +1 -1
- package/lib/cjs/defineConfig.d.ts +1 -1
- package/lib/cjs/defineConfig.d.ts.map +1 -1
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces.d.ts +9 -0
- package/lib/cjs/interfaces.d.ts.map +1 -1
- package/lib/cjs/lifecycle.d.ts +24 -0
- package/lib/cjs/lifecycle.d.ts.map +1 -0
- package/lib/cjs/lifecycle.js +187 -0
- package/lib/cjs/lifecycle.js.map +1 -0
- package/lib/cjs/loaders/ts-loader.d.mts.map +1 -1
- package/lib/cjs/loaders/ts-loader.mjs +11 -2
- package/lib/cjs/loaders/ts-loader.mjs.map +1 -1
- package/lib/cjs/package.json +6 -1
- package/lib/cjs/utils.d.ts +1 -1
- package/lib/cjs/utils.d.ts.map +1 -1
- package/lib/cjs/utils.js +9 -3
- package/lib/cjs/utils.js.map +1 -1
- package/lib/cjs/vite-config.d.ts +20 -0
- package/lib/cjs/vite-config.d.ts.map +1 -0
- package/lib/cjs/vite-config.js +401 -0
- package/lib/cjs/vite-config.js.map +1 -0
- package/lib/esm/cli-methods.d.ts +11 -3
- package/lib/esm/cli-methods.d.ts.map +1 -1
- package/lib/esm/cli-methods.js +36 -102
- package/lib/esm/cli-methods.js.map +1 -1
- package/lib/esm/cli.js +32 -8
- package/lib/esm/cli.js.map +1 -1
- package/lib/esm/commands/setup-publish.js +12 -0
- package/lib/esm/commands/setup-publish.js.map +1 -1
- package/lib/esm/commands/start.d.ts +6 -0
- package/lib/esm/commands/start.d.ts.map +1 -0
- package/lib/esm/commands/start.js +311 -0
- package/lib/esm/commands/start.js.map +1 -0
- package/lib/esm/config-webpack-app.d.ts +1 -1
- package/lib/esm/config-webpack-app.d.ts.map +1 -1
- package/lib/esm/config-webpack-app.js +1 -1
- package/lib/esm/config-webpack-app.js.map +1 -1
- package/lib/esm/config-webpack.d.ts +1 -1
- package/lib/esm/config-webpack.d.ts.map +1 -1
- package/lib/esm/config-webpack.js +4 -4
- package/lib/esm/config-webpack.js.map +1 -1
- package/lib/esm/defineConfig.d.ts +1 -1
- package/lib/esm/defineConfig.d.ts.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces.d.ts +9 -0
- package/lib/esm/interfaces.d.ts.map +1 -1
- package/lib/esm/lifecycle.d.ts +24 -0
- package/lib/esm/lifecycle.d.ts.map +1 -0
- package/lib/esm/lifecycle.js +156 -0
- package/lib/esm/lifecycle.js.map +1 -0
- package/lib/esm/loaders/ts-loader.d.mts.map +1 -1
- package/lib/esm/loaders/ts-loader.mjs +11 -2
- package/lib/esm/loaders/ts-loader.mjs.map +1 -1
- package/lib/esm/package.json +6 -1
- package/lib/esm/utils.d.ts +1 -1
- package/lib/esm/utils.d.ts.map +1 -1
- package/lib/esm/utils.js +9 -3
- package/lib/esm/utils.js.map +1 -1
- package/lib/esm/vite-config.d.ts +20 -0
- package/lib/esm/vite-config.d.ts.map +1 -0
- package/lib/esm/vite-config.js +377 -0
- package/lib/esm/vite-config.js.map +1 -0
- package/package.json +6 -1
- package/test-results/.last-run.json +6 -0
- package/test-results/create-app-Person-fixture-add-/342/206/222-edit-/342/206/222-delete-round-trip/error-context.md +16 -0
- package/test-results/create-app-Person-fixture-add-/342/206/222-edit-/342/206/222-delete-round-trip/trace.zip +0 -0
- package/tsconfig-esm.json +1 -1
|
@@ -15,8 +15,20 @@ jobs:
|
|
|
15
15
|
contents: write
|
|
16
16
|
pull-requests: write
|
|
17
17
|
steps:
|
|
18
|
+
# Author the changesets "Version Packages" PR as the org release App (not the default
|
|
19
|
+
# GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
|
|
20
|
+
# App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
|
|
21
|
+
- name: Generate GitHub App token
|
|
22
|
+
id: app-token
|
|
23
|
+
uses: actions/create-github-app-token@v2
|
|
24
|
+
with:
|
|
25
|
+
app-id: ${{ secrets.RELEASE_APP_ID }}
|
|
26
|
+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
27
|
+
|
|
18
28
|
- name: Checkout
|
|
19
29
|
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
20
32
|
|
|
21
33
|
- name: Setup Node.js
|
|
22
34
|
uses: actions/setup-node@v4
|
|
@@ -37,6 +49,6 @@ jobs:
|
|
|
37
49
|
title: 'chore: release'
|
|
38
50
|
commit: 'chore: release'
|
|
39
51
|
env:
|
|
40
|
-
GITHUB_TOKEN: ${{
|
|
52
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
41
53
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
42
54
|
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#57](https://github.com/linked-cm/cli/pull/57) [`e8385bd`](https://github.com/linked-cm/cli/commit/e8385bd4d4287afd85fbb86d6d4d20b1ea7152a7) Thanks [@flyon](https://github.com/flyon)! - CLI sub-template imports updated to use `@_linked/core` instead of legacy
|
|
8
|
+
`lincd/...`:
|
|
9
|
+
|
|
10
|
+
- `defaults/shape.ts` — `Shape` + `NamedNode` from `@_linked/core`
|
|
11
|
+
- `defaults/package/src/package.ts` — `linkedPackage` from `@_linked/core/utils/Package` (clean 1:1 swap; `@_linked/core` exports it identically)
|
|
12
|
+
- `defaults/package/src/ontologies/example-ontology.ts` — `NamedNode` + `createNameSpace` from `@_linked/core` (unused `lincd-jsonld` import dropped)
|
|
13
|
+
|
|
14
|
+
**Important caveat — TODO comments inline in the template files explain**:
|
|
15
|
+
the `package.ts` template is a clean working swap. The `shape.ts` and
|
|
16
|
+
`ontologies/example-ontology.ts` templates' generated output **will fail
|
|
17
|
+
to compile** because `@_linked/core` doesn't export `NamedNode` or
|
|
18
|
+
`Literal` as runtime classes — the new framework architecture moved past
|
|
19
|
+
direct node construction. Templates need a rewrite to emit the modern
|
|
20
|
+
getter-only `@_linked/*` shape pattern (see `@_linked/schema/shapes/Person.ts`).
|
|
21
|
+
The import-path change is a deliberate signal-of-intent that lands
|
|
22
|
+
incomplete; the actual template rewrite is tracked as downstream
|
|
23
|
+
Shape-Builder / Ontology-Manager review work.
|
|
24
|
+
|
|
25
|
+
Users of `linked create shape Foo` and `linked create package Bar`: if you
|
|
26
|
+
hit "Cannot find name NamedNode" or "Cannot find name Literal" errors
|
|
27
|
+
in scaffolded files, you've hit the documented gap. The fix path is the
|
|
28
|
+
template rewrite, not reverting to legacy lincd.
|
|
29
|
+
|
|
30
|
+
Context: see create-now plan-011 report (docs/reports/009-legacy-lincd-eradication.md).
|
|
31
|
+
|
|
32
|
+
## 1.8.1
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- [#54](https://github.com/linked-cm/cli/pull/54) [`5d475c7`](https://github.com/linked-cm/cli/commit/5d475c718a5435ebf8d9ce0db358ebcb84a91642) Thanks [@flyon](https://github.com/flyon)! - `setup-publish` now generates publish workflows that author the changesets "Version Packages"
|
|
37
|
+
PR (and, for dual-branch, the post-release sync) via an org **GitHub App token**
|
|
38
|
+
(`actions/create-github-app-token`, org secrets `RELEASE_APP_ID` / `RELEASE_APP_PRIVATE_KEY`)
|
|
39
|
+
instead of the default `GITHUB_TOKEN` — so those PRs' checks run without a manual "Approve and
|
|
40
|
+
run" gate. The dual-branch template's version-only `sync-version-to-dev` job is replaced by a full
|
|
41
|
+
**back-merge `main -> dev`** (carrying the version bump, CHANGELOG, and changeset deletions, so dev
|
|
42
|
+
never re-releases consumed changesets). `--configure-github` also enables "Allow auto-merge" so the
|
|
43
|
+
back-merge PR self-merges once checks pass.
|
|
44
|
+
|
|
3
45
|
## 1.8.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# App environment. Copy this file to `.env` and adjust for local dev.
|
|
2
|
+
# `linked start` loads `.env` automatically (Node 20.12+ process.loadEnvFile).
|
|
3
|
+
#
|
|
4
|
+
# When CN hosts this app, CN INJECTS the dynamic per-(project, branch) vars below
|
|
5
|
+
# at spawn time (PORT, FUSEKI_DATASET, the admin secret, the EG gateway) — those
|
|
6
|
+
# take precedence over anything in this file. Vars in the "app config" section are
|
|
7
|
+
# yours to own (CN may also write them here when it manages the app).
|
|
8
|
+
|
|
9
|
+
# --- Data store (CN injects per branch; these are standalone-dev defaults) ------
|
|
10
|
+
FUSEKI_BASE_URL=http://localhost:3030
|
|
11
|
+
FUSEKI_DATASET=my-app-main
|
|
12
|
+
FUSEKI_USER=admin
|
|
13
|
+
FUSEKI_PASSWORD=admin
|
|
14
|
+
|
|
15
|
+
# --- Runtime (CN injects PORT + CN_APP_ADMIN_SECRET when it spawns the app) -----
|
|
16
|
+
PORT=4000
|
|
17
|
+
# NODE_ENV=development
|
|
18
|
+
|
|
19
|
+
# --- App config (yours — e.g. your public site root / production domain) --------
|
|
20
|
+
SITE_ROOT=http://localhost:4000
|
|
@@ -12,14 +12,20 @@
|
|
|
12
12
|
"email": ""
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=20.
|
|
15
|
+
"node": ">=20.12.0"
|
|
16
16
|
},
|
|
17
17
|
"main": "scripts/start-server.js",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./backend": {
|
|
20
|
+
"development": "./src/backend.ts",
|
|
21
|
+
"default": "./src/backend.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
18
24
|
"license": "MIT",
|
|
19
25
|
"scripts": {
|
|
20
|
-
"start": "linked start
|
|
26
|
+
"start": "linked start",
|
|
21
27
|
"build": "linked build-app --env production",
|
|
22
|
-
"server:prod": "linked start
|
|
28
|
+
"server:prod": "NODE_ENV=production linked start",
|
|
23
29
|
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
24
30
|
"lint:fix": "npm run lint -- --fix",
|
|
25
31
|
"prettier": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --check",
|
|
@@ -36,11 +42,11 @@
|
|
|
36
42
|
"web3"
|
|
37
43
|
],
|
|
38
44
|
"dependencies": {
|
|
39
|
-
"@_linked/core": "^2.
|
|
45
|
+
"@_linked/core": "^2.10",
|
|
40
46
|
"@_linked/server": "^2.0",
|
|
41
47
|
"@_linked/server-utils": "^1.0.6",
|
|
42
48
|
"@_linked/schema": "^1.0.6",
|
|
43
|
-
"@_linked/fuseki": "^
|
|
49
|
+
"@_linked/fuseki": "^1.0",
|
|
44
50
|
"@_linked/primitives": "^1.0.6",
|
|
45
51
|
"@_linked/react": "^1.3",
|
|
46
52
|
"react": "^18.2",
|
|
@@ -49,13 +55,12 @@
|
|
|
49
55
|
"react-router-dom": "^6.3.0"
|
|
50
56
|
},
|
|
51
57
|
"devDependencies": {
|
|
52
|
-
"@_linked/cli": "^1.
|
|
58
|
+
"@_linked/cli": "^1.8",
|
|
53
59
|
"@types/node": "^20.12.7",
|
|
54
60
|
"@types/react": "^18.0.17",
|
|
55
61
|
"@types/react-dom": "^18.0.6",
|
|
56
62
|
"@typescript-eslint/eslint-plugin": "latest",
|
|
57
63
|
"@typescript-eslint/parser": "latest",
|
|
58
|
-
"env-cmd": "^10.1.0",
|
|
59
64
|
"eslint": "latest",
|
|
60
65
|
"eslint-config-prettier": "^8.9.0",
|
|
61
66
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Vite config for new linked apps. Uses the shared createViteConfig
|
|
2
|
+
// helper from @_linked/cli/vite-config so future Vite upgrades propagate
|
|
3
|
+
// to every linked app via a cli bump.
|
|
4
|
+
//
|
|
5
|
+
// Run with:
|
|
6
|
+
// yarn start (Vite dev — plan-010 default once stable)
|
|
7
|
+
// yarn start:webpack (legacy webpack path — migration escape hatch)
|
|
8
|
+
import {createViteConfig} from '@_linked/cli/vite-config';
|
|
9
|
+
|
|
10
|
+
export default createViteConfig({
|
|
11
|
+
port: 4040,
|
|
12
|
+
cssMode: 'tailwind',
|
|
13
|
+
});
|
|
@@ -17,8 +17,20 @@ jobs:
|
|
|
17
17
|
contents: write
|
|
18
18
|
pull-requests: write
|
|
19
19
|
steps:
|
|
20
|
+
# Author the changesets "Version Packages" PR as the org release App (not the default
|
|
21
|
+
# GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
|
|
22
|
+
# App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
|
|
23
|
+
- name: Generate GitHub App token
|
|
24
|
+
id: app-token
|
|
25
|
+
uses: actions/create-github-app-token@v2
|
|
26
|
+
with:
|
|
27
|
+
app-id: ${{ secrets.RELEASE_APP_ID }}
|
|
28
|
+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
29
|
+
|
|
20
30
|
- name: Checkout
|
|
21
31
|
uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
22
34
|
|
|
23
35
|
- name: Setup Node.js
|
|
24
36
|
uses: actions/setup-node@v4
|
|
@@ -39,13 +51,20 @@ jobs:
|
|
|
39
51
|
publish: npx changeset publish
|
|
40
52
|
title: "chore: release"
|
|
41
53
|
commit: "chore: release"
|
|
54
|
+
# npm auth uses the npm token below. Do NOT switch to OIDC trusted publishing
|
|
55
|
+
# (id-token: write + publishConfig.provenance) unless you FIRST register this package's
|
|
56
|
+
# trusted publisher on npmjs.com — otherwise publishes fail with 404 / permission errors.
|
|
42
57
|
env:
|
|
43
|
-
GITHUB_TOKEN: ${{
|
|
58
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
44
59
|
NODE_AUTH_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
|
|
45
60
|
NPM_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
backmerge-to-dev:
|
|
63
|
+
# Full back-merge of main into dev after a release. Unlike a version-only sync, this also
|
|
64
|
+
# carries the CHANGELOG and — critically — the changeset *deletions* the release made, so dev
|
|
65
|
+
# never keeps already-released changesets that would otherwise re-release on the next dev->main.
|
|
66
|
+
# Requires "Allow auto-merge" enabled on the repo for the PR to self-merge once checks pass.
|
|
67
|
+
name: Back-merge main into dev
|
|
49
68
|
needs: release
|
|
50
69
|
if: github.ref == 'refs/heads/main'
|
|
51
70
|
runs-on: ubuntu-latest
|
|
@@ -53,33 +72,43 @@ jobs:
|
|
|
53
72
|
contents: write
|
|
54
73
|
pull-requests: write
|
|
55
74
|
steps:
|
|
56
|
-
- name:
|
|
75
|
+
- name: Generate GitHub App token
|
|
76
|
+
id: app-token
|
|
77
|
+
uses: actions/create-github-app-token@v2
|
|
78
|
+
with:
|
|
79
|
+
app-id: ${{ secrets.RELEASE_APP_ID }}
|
|
80
|
+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
81
|
+
|
|
82
|
+
- name: Checkout
|
|
57
83
|
uses: actions/checkout@v4
|
|
58
84
|
with:
|
|
59
|
-
ref: dev
|
|
60
85
|
fetch-depth: 0
|
|
86
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
61
87
|
|
|
62
|
-
- name:
|
|
88
|
+
- name: Open & auto-merge back-merge PR (main -> dev)
|
|
63
89
|
env:
|
|
64
|
-
|
|
90
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
65
91
|
run: |
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
git fetch origin main dev
|
|
93
|
+
# Nothing to do when dev already contains main.
|
|
94
|
+
if git merge-base --is-ancestor origin/main origin/dev; then
|
|
95
|
+
echo "dev already contains main — nothing to back-merge."
|
|
96
|
+
exit 0
|
|
97
|
+
fi
|
|
98
|
+
# Reuse an existing open back-merge PR if present, else open one.
|
|
99
|
+
pr=$(gh pr list --base dev --head main --state open --json number --jq '.[0].number // empty')
|
|
100
|
+
if [ -z "$pr" ]; then
|
|
101
|
+
url=$(gh pr create --base dev --head main \
|
|
102
|
+
--title "chore: back-merge main into dev (post-release sync)" \
|
|
103
|
+
--body "Automated post-release back-merge: brings the version bump, CHANGELOG, and changeset deletions from main into dev so dev stays clean and a future dev->main never re-releases consumed changesets.")
|
|
104
|
+
pr="${url##*/}"
|
|
105
|
+
echo "Opened back-merge PR #$pr"
|
|
106
|
+
else
|
|
107
|
+
echo "Reusing existing back-merge PR #$pr"
|
|
82
108
|
fi
|
|
109
|
+
# Auto-merge once required checks pass (needs "Allow auto-merge" enabled on the repo).
|
|
110
|
+
gh pr merge "$pr" --auto --merge \
|
|
111
|
+
|| echo "Auto-merge unavailable (disabled or conflicts) — PR #$pr left open for manual merge."
|
|
83
112
|
|
|
84
113
|
dev-release:
|
|
85
114
|
name: Publish Dev Release
|
|
@@ -15,8 +15,20 @@ jobs:
|
|
|
15
15
|
contents: write
|
|
16
16
|
pull-requests: write
|
|
17
17
|
steps:
|
|
18
|
+
# Author the changesets "Version Packages" PR as the org release App (not the default
|
|
19
|
+
# GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
|
|
20
|
+
# App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
|
|
21
|
+
- name: Generate GitHub App token
|
|
22
|
+
id: app-token
|
|
23
|
+
uses: actions/create-github-app-token@v2
|
|
24
|
+
with:
|
|
25
|
+
app-id: ${{ secrets.RELEASE_APP_ID }}
|
|
26
|
+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
27
|
+
|
|
18
28
|
- name: Checkout
|
|
19
29
|
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
20
32
|
|
|
21
33
|
- name: Setup Node.js
|
|
22
34
|
uses: actions/setup-node@v4
|
|
@@ -36,7 +48,10 @@ jobs:
|
|
|
36
48
|
publish: npx changeset publish
|
|
37
49
|
title: 'chore: release'
|
|
38
50
|
commit: 'chore: release'
|
|
51
|
+
# npm auth uses the npm token below. Do NOT switch to OIDC trusted publishing
|
|
52
|
+
# (id-token: write + publishConfig.provenance) unless you FIRST register this package's
|
|
53
|
+
# trusted publisher on npmjs.com — otherwise publishes fail with 404 / permission errors.
|
|
39
54
|
env:
|
|
40
|
-
GITHUB_TOKEN: ${{
|
|
55
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
41
56
|
NODE_AUTH_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
|
|
42
57
|
NPM_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
|
package/defaults/shape.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// TODO(plan-1.5 / Phase 3 — Shape Builder review): @_linked/core does
|
|
2
|
+
// not export NamedNode as a class. The template needs to be rewritten to
|
|
3
|
+
// match the modern @_linked/* shape pattern — see packages/schema/src/
|
|
4
|
+
// shapes/Person.ts (getter-only, no NamedNode annotation). Import paths
|
|
5
|
+
// updated to @_linked/core to flag intent; current generated output
|
|
6
|
+
// won't compile until the template + downstream tooling are updated.
|
|
7
|
+
import {Shape} from '@_linked/core/shapes/Shape';
|
|
8
|
+
import {NamedNode} from '@_linked/core';
|
|
3
9
|
import {linkedShape} from '../package.js';
|
|
4
10
|
|
|
5
11
|
@linkedShape
|
package/lib/cjs/cli-methods.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { PackageDetails } from './interfaces';
|
|
1
|
+
import type { PackageDetails } from './interfaces.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dynamically import the app's backend storage configuration. Tries the
|
|
4
|
+
* canonical `linked.backend.storage.{ts,js}` at app root first, then the
|
|
5
|
+
* earlier `backend-storage-config.{ts,js}` (Iter3), then the legacy
|
|
6
|
+
* `scripts/storage-config.js` (pre-rename). The fallback chain lets older
|
|
7
|
+
* app clones keep booting through the rename.
|
|
8
|
+
*/
|
|
9
|
+
import { ensureEnvironmentLoaded, loadBackendStorageConfig, getLincdPackages } from './lifecycle.js';
|
|
10
|
+
export { ensureEnvironmentLoaded, loadBackendStorageConfig, getLincdPackages };
|
|
2
11
|
export declare const createApp: (name: any, basePath?: string, options?: {
|
|
3
12
|
appName?: string;
|
|
4
13
|
appPrefix?: string;
|
|
@@ -10,8 +19,8 @@ export declare function logError(...errors: any[]): void;
|
|
|
10
19
|
export declare function developPackage(target: any, mode: any): void;
|
|
11
20
|
export declare function runOnPackagesGroupedByDependencies(lincdPackages: any, onBuildStack: (packageGroup: any, dependencies: any) => (pkg: PackageDetails) => Promise<any>, onStackEnd: any, sync?: boolean): Promise<void>;
|
|
12
21
|
export declare function buildAll(options: any): void;
|
|
13
|
-
export declare function getLincdPackages(rootPath?: string): PackageDetails[];
|
|
14
22
|
export declare const createOntology: (prefix: any, uriBase?: any, basePath?: string) => Promise<void>;
|
|
23
|
+
export declare const addLineToIndex: (line: any, insertMatchString: string, root?: string, insertAtStart?: boolean) => string;
|
|
15
24
|
export declare const setNameVariables: (name: any) => {
|
|
16
25
|
hyphenName: any;
|
|
17
26
|
camelCaseName: any;
|
|
@@ -32,7 +41,6 @@ invalidImports?: Map<string, {
|
|
|
32
41
|
}[]>) => Promise<boolean>;
|
|
33
42
|
export declare const depCheckStaged: () => Promise<void>;
|
|
34
43
|
export declare const depCheck: (packagePath?: string) => Promise<unknown>;
|
|
35
|
-
export declare const ensureEnvironmentLoaded: () => Promise<void>;
|
|
36
44
|
export declare const runScript: (scriptName: string, options: {
|
|
37
45
|
spawn: boolean;
|
|
38
46
|
}) => Promise<never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-methods.d.ts","sourceRoot":"","sources":["../../src/cli-methods.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAC,cAAc,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"cli-methods.d.ts","sourceRoot":"","sources":["../../src/cli-methods.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAgBpD;;;;;;GAMG;AAKH,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,uBAAuB,EAAE,wBAAwB,EAAE,gBAAgB,EAAC,CAAC;AAoB7E,eAAO,MAAM,SAAS,GAAU,SAAI,EAAE,iBAAwB,EAAE,UAAS;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAM,kBAgL9J,CAAC;AAmBF,wBAAgB,IAAI,CAAC,GAAG,QAAQ,OAAA,QAK/B;AACD,wBAAgB,QAAQ,CAAC,GAAG,MAAM,OAAA,QAIjC;AACD,wBAAgB,cAAc,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA,QAyB1C;AA2CD,wBAAgB,kCAAkC,CAChD,aAAa,KAAA,EACb,YAAY,EAAE,CACZ,YAAY,KAAA,EACZ,YAAY,KAAA,KACT,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,GAAG,CAAC,EAC1C,UAAU,KAAA,EACV,IAAI,UAAQ,GACX,OAAO,CAAC,IAAI,CAAC,CAqNf;AA+ID,wBAAgB,QAAQ,CAAC,OAAO,KAAA,QAkU/B;AA2ED,eAAO,MAAM,cAAc,GACzB,WAAM,EACN,aAAQ,EACR,iBAAwB,kBA6FzB,CAAC;AAGF,eAAO,MAAM,cAAc,GACzB,SAAI,EACJ,mBAAmB,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