@pipelex/create-method-app 0.5.7 → 0.29.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.
- package/README.md +3 -3
- package/lib/git.mjs +6 -4
- package/lib/pack.mjs +2 -2
- package/package.json +7 -5
- package/templates/webapp-js.pack +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ npm create @pipelex/method-app@latest my-app -- --method ./receipt_review.mthds
|
|
|
8
8
|
make -C my-app serve
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The first command writes the [`webapp-js`](https://github.com/Pipelex/pipelex-
|
|
11
|
+
The first command writes the [`webapp-js`](https://github.com/Pipelex/pipelex-sdk/tree/main/method-apps/webapp-js) template of the [method-app family](https://github.com/Pipelex/pipelex-sdk/tree/main/method-apps), the `method-apps/` directory of `Pipelex/pipelex-sdk`, into `my-app/`, commits it as it came, and runs the copy's own `make create`, which scaffolds the method, names the project after it and runs `make all`. The second starts the dev server in the background, proves that the page answers, and prints its URL; `make stop` stops it. `make dev` runs the same server in the foreground instead.
|
|
12
12
|
|
|
13
13
|
`--method` takes a `.mthds` file or a directory of them, a method id from your organization's catalog (`mt_…`), or a published package address (`github.com/Pipelex/methods/text_stats@v0.1.1`). A path is read from where you typed the command.
|
|
14
14
|
|
|
@@ -48,13 +48,13 @@ The initializer reads git before it writes anything:
|
|
|
48
48
|
| A repository with commits, holding only `.git` | Refused: every tracked file would show as deleted, and the commit would record that |
|
|
49
49
|
| Inside another repository's work tree, at a path it ignores | A new repository on `main`, then the pristine commit: that repository does not see the project |
|
|
50
50
|
| Inside another repository's work tree | No repository and no commit: the project is new files in that repository. `--no-create` lets you commit the template there first |
|
|
51
|
-
| Inside a checkout of `pipelex-method-apps` or of a starter
|
|
51
|
+
| Inside a checkout of `pipelex-sdk`, of `pipelex-method-apps` or of a starter | Refused, `--no-git` included whenever git is on the PATH |
|
|
52
52
|
|
|
53
53
|
A path the enclosing repository ignores, such as a `tmp/` its `.gitignore` lists or anywhere under a home directory kept as a repository that ignores `*`, is one it does not version, so a project there gets a repository of its own rather than no version control at all. Every source git reads counts: the enclosing repository's `.gitignore` files, its `.git/info/exclude`, and your `core.excludesFile`. What counts is the directory itself, which a missing destination is made for a moment to let git read: a directory the enclosing repository does not ignore gets no repository even when every file in it is ignored, as under `*` followed by `!*/`, since a repository there would still show in the enclosing one's `git status`, and the `git:` line then says the project is under no version control. A destination that is a symlink is read where it points: the repository whose work tree holds its target is the one whose ignores count.
|
|
54
54
|
|
|
55
55
|
A commit needs a git identity, and a missing one is refused before anything is written. When git shows none outside a repository, the initializer asks again inside a throwaway repository at the destination, which it removes before going on, so an identity given only by an `includeIf "gitdir:…"` section is found. At a path another repository ignores, it always asks inside that throwaway repository, since an identity set in the enclosing repository's own configuration does not reach the new one.
|
|
56
56
|
|
|
57
|
-
The pristine commit reads `Start from Pipelex/pipelex-method-apps/webapp-js <version> (<sha>)`, so `make create`'s changes are a diff you can read before committing them. `make create` itself commits nothing.
|
|
57
|
+
The pristine commit reads `Start from Pipelex/pipelex-sdk/method-apps/webapp-js <version> (<sha>)`, so `make create`'s changes are a diff you can read before committing them. `make create` itself commits nothing.
|
|
58
58
|
|
|
59
59
|
## What it prints
|
|
60
60
|
|
package/lib/git.mjs
CHANGED
|
@@ -34,11 +34,13 @@ import path from "node:path";
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* The repositories whose checkouts are templates, read from `origin`: the
|
|
37
|
-
* family's own, and
|
|
38
|
-
*
|
|
37
|
+
* family's own, `pipelex-sdk`, and `pipelex-method-apps`, where the family
|
|
38
|
+
* lived before, whose clones still hold the templates; and the starters.
|
|
39
|
+
* Running the initializer inside one would make a project of a template's
|
|
40
|
+
* checkout.
|
|
39
41
|
*/
|
|
40
42
|
export const TEMPLATE_ORIGINS =
|
|
41
|
-
/[/:](pipelex\/(pipelex-method-apps|pipelex-starter-js|pipelex-starter-python)|mthds-ai\/mthds-starter-js)(\.git)?\/?$/i;
|
|
43
|
+
/[/:](pipelex\/(pipelex-sdk|pipelex-method-apps|pipelex-starter-js|pipelex-starter-python)|mthds-ai\/mthds-starter-js)(\.git)?\/?$/i;
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* Variables that point git at a repository other than the one it would find
|
|
@@ -240,7 +242,7 @@ export function hasIdentityForInit({ dest, from, enclosed, env }) {
|
|
|
240
242
|
|
|
241
243
|
/** The pristine commit's message, in the scaffold skill's format. */
|
|
242
244
|
export function pristineMessage({ template, version, source }) {
|
|
243
|
-
return `Start from Pipelex/pipelex-method-apps/${template} ${version} (${source})`;
|
|
245
|
+
return `Start from Pipelex/pipelex-sdk/method-apps/${template} ${version} (${source})`;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
/**
|
package/lib/pack.mjs
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* {"format":1,"template":"webapp-js","version":"0.4.0","source":"<sha>",
|
|
15
15
|
* "files":[{"path":"package.json","mode":"100644","size":2345}, …]}
|
|
16
16
|
*
|
|
17
|
-
* `version` is the
|
|
18
|
-
* both named by the pristine commit. `mode` is git's: a plain or an executable
|
|
17
|
+
* `version` is the repository's, from `VERSION` at its root, and `source` the
|
|
18
|
+
* commit the tree was packed from, both named by the pristine commit. `mode` is git's: a plain or an executable
|
|
19
19
|
* file, and nothing else. A path is relative to the template's directory.
|
|
20
20
|
*/
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelex/create-method-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Start a Pipelex method app: npm create @pipelex/method-app@latest my-app -- --method <bundle | mt_… | address>",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pipelex",
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/Pipelex/pipelex-
|
|
28
|
-
"directory": "initializers/js"
|
|
27
|
+
"url": "git+https://github.com/Pipelex/pipelex-sdk.git",
|
|
28
|
+
"directory": "method-apps/initializers/js"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/Pipelex/pipelex-sdk/tree/main/method-apps/initializers/js#readme",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/Pipelex/pipelex-sdk/issues"
|
|
29
33
|
},
|
|
30
|
-
"homepage": "https://github.com/Pipelex/pipelex-method-apps/tree/main/initializers/js#readme",
|
|
31
|
-
"bugs": "https://github.com/Pipelex/pipelex-method-apps/issues",
|
|
32
34
|
"publishConfig": {
|
|
33
35
|
"access": "public",
|
|
34
36
|
"provenance": true
|
package/templates/webapp-js.pack
CHANGED
|
Binary file
|