@usecontextlayer/cli 0.15.0 → 0.16.0
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 +10 -8
- package/dist/{auth-CMrKVwsH.mjs → auth-DOsE8GwJ.mjs} +2 -2
- package/dist/{auth-CMrKVwsH.mjs.map → auth-DOsE8GwJ.mjs.map} +1 -1
- package/dist/auth.mjs +1 -1
- package/dist/cli.mjs +57 -57
- package/dist/cli.mjs.map +1 -1
- package/dist/{resources-5FTDu19i.mjs → resources-B-EYHG1j.mjs} +77 -77
- package/dist/resources-B-EYHG1j.mjs.map +1 -0
- package/dist/template/AGENTS.md +6 -6
- package/dist/template/README.md +14 -12
- package/dist/template/app/root.tsx +7 -7
- package/dist/template/app/routes/home.tsx +8 -7
- package/dist/template/workers/app.ts +2 -2
- package/dist/template/workers/local-resources/index.ts +6 -1
- package/dist/template/workers/local-resources/wrangler.jsonc +2 -2
- package/dist/vite.d.mts +19 -19
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +15 -15
- package/dist/vite.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/resources-5FTDu19i.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# @usecontextlayer/cli
|
|
2
2
|
|
|
3
|
-
Create
|
|
3
|
+
Create and deploy ContextLayer slates, and connect accounts with the `ctx` CLI.
|
|
4
|
+
|
|
5
|
+
The [domain model](https://github.com/usecontextlayer/contextlayer/blob/main/ARCHITECTURE.md#domain-model) defines slates, declarations, resources, Owners, and assignments.
|
|
4
6
|
|
|
5
7
|
Use Node.js 24 or newer, pnpm, and Git. Git author identity must be configured; initialization displays Git's configuration instructions when it is missing.
|
|
6
8
|
|
|
7
|
-
Start with login, then create and run your
|
|
9
|
+
Start with login, then create and run your slate:
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
12
|
npx @usecontextlayer/cli login
|
|
11
|
-
npx @usecontextlayer/cli init my-
|
|
12
|
-
cd my-
|
|
13
|
+
npx @usecontextlayer/cli init my-slate
|
|
14
|
+
cd my-slate
|
|
13
15
|
pnpm dev
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
Approve login in your browser. Open the local URL printed by the development server. Initialization prints your
|
|
18
|
+
Approve login in your browser. Open the local URL printed by the development server. Initialization prints your slate's dashboard link and hosted URL; the hosted URL becomes usable after a successful Git push deployment.
|
|
17
19
|
|
|
18
|
-
The
|
|
20
|
+
The checkout's README explains local development, connections, and deployment. The [SDK guide](https://www.npmjs.com/package/@usecontextlayer/sdk) describes loaders, tools, and the shared app layout.
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Connect an account to ContextLayer in your browser, then assign the connected account to a connection declared by your slate. Already connected accounts can go directly to assignment. The SDK's Gmail recipe includes this full sequence.
|
|
21
23
|
|
|
22
24
|
Command syntax and options live in the CLI's help:
|
|
23
25
|
|
|
@@ -25,7 +27,7 @@ Command syntax and options live in the CLI's help:
|
|
|
25
27
|
npx @usecontextlayer/cli --help
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
Deploy from the checkout's `main` branch:
|
|
29
31
|
|
|
30
32
|
```sh
|
|
31
33
|
git add .
|
|
@@ -6801,7 +6801,7 @@ async function save(env, tokens, previousRefreshToken) {
|
|
|
6801
6801
|
async function login(env) {
|
|
6802
6802
|
const config = await configuration(env);
|
|
6803
6803
|
const authorization = await initiateDeviceAuthorization(config, {
|
|
6804
|
-
resource: "https://
|
|
6804
|
+
resource: "https://platform.usecontextlayer.com",
|
|
6805
6805
|
scope: "offline_access platform:access"
|
|
6806
6806
|
});
|
|
6807
6807
|
console.log(`Open ${authorization.verification_uri_complete ?? authorization.verification_uri}`);
|
|
@@ -6844,4 +6844,4 @@ async function listOrganizations(env, headers) {
|
|
|
6844
6844
|
//#endregion
|
|
6845
6845
|
export { ZodError as C, uuid as S, strictObject as _, login as a, unknown as b, array as c, hostname as d, literal as f, record as g, object as h, listOrganizations as i, boolean as l, number as m, getAccessToken as n, _enum as o, looseObject as p, getCurrentUser as r, _null as s, LoginRequiredError as t, discriminatedUnion as u, string as v, url as x, union as y };
|
|
6846
6846
|
|
|
6847
|
-
//# sourceMappingURL=auth-
|
|
6847
|
+
//# sourceMappingURL=auth-DOsE8GwJ.mjs.map
|