@plexus-ms/lib 0.131.0 → 0.132.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/dist/apply.d.ts.map +1 -1
- package/dist/apply.js +1 -2
- package/dist/apply.js.map +1 -1
- package/dist/bookkeeping.js +3 -3
- package/dist/bookkeeping.js.map +1 -1
- package/dist/changeset.js +3 -3
- package/dist/changeset.js.map +1 -1
- package/dist/consumers.d.ts +4 -20
- package/dist/consumers.d.ts.map +1 -1
- package/dist/consumers.js +16 -58
- package/dist/consumers.js.map +1 -1
- package/dist/doctor.d.ts +2 -2
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +16 -5
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +1 -1
- package/dist/marker.js +1 -1
- package/dist/marker.js.map +1 -1
- package/dist/model.d.ts +12 -17
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +18 -24
- package/dist/model.js.map +1 -1
- package/dist/newSite.d.ts.map +1 -1
- package/dist/newSite.js +5 -6
- package/dist/newSite.js.map +1 -1
- package/dist/overview.d.ts +1 -1
- package/dist/overview.d.ts.map +1 -1
- package/dist/overview.js +18 -20
- package/dist/overview.js.map +1 -1
- package/dist/recursive.js +2 -2
- package/dist/recursive.js.map +1 -1
- package/dist/requirements.d.ts +1 -1
- package/dist/requirements.d.ts.map +1 -1
- package/dist/requirements.js +11 -13
- package/dist/requirements.js.map +1 -1
- package/dist/standard-index.json +1 -1
- package/dist/take.js +2 -2
- package/dist/take.js.map +1 -1
- package/dist/update.d.ts +30 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +21 -14
- package/dist/update.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -8
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
- package/dist/copier.d.ts +0 -17
- package/dist/copier.d.ts.map +0 -1
- package/dist/copier.js +0 -35
- package/dist/copier.js.map +0 -1
- package/dist/templates.d.ts +0 -19
- package/dist/templates.d.ts.map +0 -1
- package/dist/templates.js +0 -51
- package/dist/templates.js.map +0 -1
package/dist/templates.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// The templates (§ 1.6 PLX) by name, and what a copier answers file's recorded
|
|
2
|
-
// source says about which one a site is generated from. The model (which repo
|
|
3
|
-
// is the operations repo) and the consumers (which repos `update` refuses as
|
|
4
|
-
// not crossed over, which sites the preview of an unreleased version takes)
|
|
5
|
-
// read a source through `templateOf`.
|
|
6
|
-
import { VERSIONED_REPOS } from "./version.js";
|
|
7
|
-
/** The versioned repos that are templates: what a repo can be generated from. */
|
|
8
|
-
export const TEMPLATES = VERSIONED_REPOS.filter((r) => r.startsWith('template-'));
|
|
9
|
-
/** The template source copier records for a template of the upstream organisation. */
|
|
10
|
-
export const templateSource = (template) => `gh:plexus-ms/${template}`;
|
|
11
|
-
/**
|
|
12
|
-
* Templates renamed on a version, old name → current (0.114.0: the web template
|
|
13
|
-
* became the Turborepo template, the platform repo the operations repo; 0.120.0:
|
|
14
|
-
* the repos' `preset-` prefix became `template-`, copier's own word). A
|
|
15
|
-
* consumer whose answers still name the old one is a consumer of the current
|
|
16
|
-
* one.
|
|
17
|
-
*/
|
|
18
|
-
export const RENAMED_TEMPLATES = {
|
|
19
|
-
'preset-repo-web': 'template-repo-turbo',
|
|
20
|
-
'preset-repo-platform': 'template-repo-operations',
|
|
21
|
-
'preset-repo-turbo': 'template-repo-turbo',
|
|
22
|
-
'preset-app-nextjs': 'template-app-nextjs',
|
|
23
|
-
'preset-repo-operations': 'template-repo-operations',
|
|
24
|
-
};
|
|
25
|
-
/** The organisation the templates are published under. */
|
|
26
|
-
const UPSTREAM = 'plexus-ms';
|
|
27
|
-
/**
|
|
28
|
-
* A recorded source as owner and repo name, whichever way it spells a GitHub
|
|
29
|
-
* repo: copier's `gh:owner/repo`, `https://github.com/owner/repo`,
|
|
30
|
-
* `git@github.com:owner/repo` or `ssh://git@github.com/owner/repo`, each with
|
|
31
|
-
* or without `.git`. Undefined for anything else, a local path among them.
|
|
32
|
-
*/
|
|
33
|
-
function githubRepoOf(src) {
|
|
34
|
-
const m = /^(?:gh:|https?:\/\/(?:www\.)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i.exec(src.trim());
|
|
35
|
-
return m?.[1] && m[2] ? { owner: m[1].toLowerCase(), name: m[2].toLowerCase() } : undefined;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* The current template a recorded template source stands for, under its
|
|
39
|
-
* current or an earlier name, or undefined when it is none of the given
|
|
40
|
-
* templates. Owner and repo name are compared, not the spelling.
|
|
41
|
-
*/
|
|
42
|
-
export function templateOf(src, templates) {
|
|
43
|
-
const repo = githubRepoOf(src);
|
|
44
|
-
if (repo?.owner !== UPSTREAM)
|
|
45
|
-
return undefined;
|
|
46
|
-
if (templates.includes(repo.name))
|
|
47
|
-
return repo.name;
|
|
48
|
-
const current = Object.hasOwn(RENAMED_TEMPLATES, repo.name) ? RENAMED_TEMPLATES[repo.name] : undefined;
|
|
49
|
-
return current && templates.includes(current) ? current : undefined;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=templates.js.map
|
package/dist/templates.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,sCAAsC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,iFAAiF;AACjF,MAAM,CAAC,MAAM,SAAS,GAAsB,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CA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