tempora-cli 0.1.2 → 0.1.3
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 +47 -0
- package/dist/index.js +18 -10
- package/dist/registry.json +26 -1
- package/package.json +3 -2
- package/registry.json +26 -1
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# tempora-cli
|
|
2
|
+
|
|
3
|
+
A fast, language-agnostic CLI that bootstraps your project from a curated vault of community templates — no setup, no guesswork.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g tempora-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
**Guided mode:**
|
|
14
|
+
```bash
|
|
15
|
+
tempora init
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Direct mode:**
|
|
19
|
+
```bash
|
|
20
|
+
tempora init next-tailwind my-app
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Scaffold into current folder:**
|
|
24
|
+
```bash
|
|
25
|
+
tempora init next-tailwind .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Browse template info:**
|
|
29
|
+
```bash
|
|
30
|
+
tempora info next-tailwind
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
- Node.js 18+
|
|
36
|
+
- git
|
|
37
|
+
- npm
|
|
38
|
+
|
|
39
|
+
## Links
|
|
40
|
+
|
|
41
|
+
- [Documentation](https://tempora.vercel.app)
|
|
42
|
+
- [GitHub](https://github.com/DidIrb/tempora)
|
|
43
|
+
- [npm](https://www.npmjs.com/package/tempora-cli)
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT © Tempora
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var logger = {
|
|
|
19
19
|
|
|
20
20
|
// src/utils/versionCheck.ts
|
|
21
21
|
import { createRequire } from "module";
|
|
22
|
+
import pc2 from "picocolors";
|
|
22
23
|
var require2 = createRequire(import.meta.url);
|
|
23
24
|
var { version: current } = require2("../package.json");
|
|
24
25
|
async function checkVersion() {
|
|
@@ -33,9 +34,11 @@ async function checkVersion() {
|
|
|
33
34
|
const [latMajor, latMinor] = latest.split(".").map(Number);
|
|
34
35
|
const isMinorOrMajor = latMajor > curMajor || latMajor === curMajor && latMinor > curMinor;
|
|
35
36
|
if (!isMinorOrMajor) return;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
console.log("");
|
|
38
|
+
console.log(" " + pc2.bgYellow(pc2.black(" UPDATE ")) + " " + pc2.dim(current) + " \u2192 " + pc2.green(pc2.bold(latest)));
|
|
39
|
+
console.log(" " + pc2.dim("Run: ") + pc2.cyan("npm install -g tempora-cli"));
|
|
40
|
+
console.log(" " + pc2.dim("https://www.npmjs.com/package/tempora-cli"));
|
|
41
|
+
console.log("");
|
|
39
42
|
} catch {
|
|
40
43
|
}
|
|
41
44
|
}
|
|
@@ -76,7 +79,7 @@ import { execSync } from "child_process";
|
|
|
76
79
|
import { fileURLToPath } from "url";
|
|
77
80
|
|
|
78
81
|
// src/config.ts
|
|
79
|
-
var org = "
|
|
82
|
+
var org = "DidIrb";
|
|
80
83
|
var repo = "tempora";
|
|
81
84
|
var branch = "main";
|
|
82
85
|
var config = {
|
|
@@ -159,17 +162,20 @@ The template may have been moved or removed. Run "tempora init" to browse availa
|
|
|
159
162
|
fs2.rmSync(tmpDir, { recursive: true, force: true });
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
|
-
async function downloadTemplate(template, targetDir, overwrite) {
|
|
165
|
+
async function downloadTemplate(template, targetDir, overwrite, spinner) {
|
|
163
166
|
const localTemplatesDir = findLocalTemplatesDir();
|
|
164
167
|
if (localTemplatesDir) {
|
|
168
|
+
if (spinner) spinner.text = "Copying template from local...";
|
|
169
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
165
170
|
const relativeParts = template.path.replace(/^templates\//, "").split("/");
|
|
166
171
|
const localSrc = path2.join(localTemplatesDir, ...relativeParts);
|
|
167
172
|
if (fs2.existsSync(localSrc)) {
|
|
168
173
|
copyDirLocal(localSrc, targetDir, overwrite);
|
|
169
174
|
return;
|
|
170
175
|
}
|
|
171
|
-
throw new Error(`Template "${template.id}" not found in local templates folder.`);
|
|
172
176
|
}
|
|
177
|
+
if (spinner) spinner.text = `Downloading ${template.name} from GitHub...`;
|
|
178
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
173
179
|
cloneTemplateSparse(template.path, targetDir, overwrite);
|
|
174
180
|
}
|
|
175
181
|
|
|
@@ -300,10 +306,12 @@ function registerInitCommand(program2) {
|
|
|
300
306
|
const result = await resolveTargetDir(resolvedDirectory);
|
|
301
307
|
if (!result) return;
|
|
302
308
|
const { targetDir, overwrite } = result;
|
|
303
|
-
|
|
304
|
-
|
|
309
|
+
await new Promise((r) => setTimeout(r, 100));
|
|
310
|
+
spinner.start();
|
|
311
|
+
await downloadTemplate(entry, targetDir, overwrite, spinner);
|
|
305
312
|
spinner.succeed(`${entry.name} scaffolded successfully!`);
|
|
306
313
|
printPostInstall(entry, targetDir);
|
|
314
|
+
await checkVersion();
|
|
307
315
|
} catch (err) {
|
|
308
316
|
spinner.stop();
|
|
309
317
|
logger.error(err instanceof Error ? err.message : "Something went wrong.");
|
|
@@ -314,7 +322,7 @@ function registerInitCommand(program2) {
|
|
|
314
322
|
|
|
315
323
|
// src/commands/info.ts
|
|
316
324
|
function registerInfoCommand(program2) {
|
|
317
|
-
program2.command("info <template>").description("Show details about a specific template").action((template) => {
|
|
325
|
+
program2.command("info <template>").description("Show details about a specific template").action(async (template) => {
|
|
318
326
|
try {
|
|
319
327
|
const registry = loadRegistry();
|
|
320
328
|
const entry = registry.templates[template];
|
|
@@ -340,6 +348,7 @@ function registerInfoCommand(program2) {
|
|
|
340
348
|
}
|
|
341
349
|
logger.log("");
|
|
342
350
|
}
|
|
351
|
+
await checkVersion();
|
|
343
352
|
} catch (err) {
|
|
344
353
|
logger.error(err instanceof Error ? err.message : "Something went wrong.");
|
|
345
354
|
process.exit(1);
|
|
@@ -360,5 +369,4 @@ Examples:
|
|
|
360
369
|
`);
|
|
361
370
|
registerInitCommand(program);
|
|
362
371
|
registerInfoCommand(program);
|
|
363
|
-
checkVersion().catch(() => void 0);
|
|
364
372
|
program.parse(process.argv);
|
package/dist/registry.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"updatedAt": "2026-06-
|
|
3
|
+
"updatedAt": "2026-06-28T01:10:10.949Z",
|
|
4
4
|
"templates": {
|
|
5
|
+
"angular-starter": {
|
|
6
|
+
"id": "angular-starter",
|
|
7
|
+
"name": "Angular Starter",
|
|
8
|
+
"language": "typescript",
|
|
9
|
+
"category": "frontend",
|
|
10
|
+
"library": "angular",
|
|
11
|
+
"description": "Angular 17 standalone components with TypeScript and Angular CLI preconfigured.",
|
|
12
|
+
"tags": [
|
|
13
|
+
"angular",
|
|
14
|
+
"typescript",
|
|
15
|
+
"frontend",
|
|
16
|
+
"spa"
|
|
17
|
+
],
|
|
18
|
+
"version": "1.0.0",
|
|
19
|
+
"nextSteps": [
|
|
20
|
+
"npm install",
|
|
21
|
+
"ng serve"
|
|
22
|
+
],
|
|
23
|
+
"path": "templates/typescript/frontend/angular/angular-starter"
|
|
24
|
+
},
|
|
5
25
|
"next-tailwind": {
|
|
6
26
|
"id": "next-tailwind",
|
|
7
27
|
"name": "Next.js + Tailwind",
|
|
@@ -45,12 +65,14 @@
|
|
|
45
65
|
},
|
|
46
66
|
"byLanguage": {
|
|
47
67
|
"typescript": [
|
|
68
|
+
"angular-starter",
|
|
48
69
|
"next-tailwind",
|
|
49
70
|
"nextjs-tailwind"
|
|
50
71
|
]
|
|
51
72
|
},
|
|
52
73
|
"byCategory": {
|
|
53
74
|
"frontend": [
|
|
75
|
+
"angular-starter",
|
|
54
76
|
"next-tailwind"
|
|
55
77
|
],
|
|
56
78
|
"fullstack": [
|
|
@@ -58,6 +80,9 @@
|
|
|
58
80
|
]
|
|
59
81
|
},
|
|
60
82
|
"byLibrary": {
|
|
83
|
+
"angular": [
|
|
84
|
+
"angular-starter"
|
|
85
|
+
],
|
|
61
86
|
"nextjs": [
|
|
62
87
|
"next-tailwind"
|
|
63
88
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tempora-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Tempora CLI — scaffold projects from curated templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"bin",
|
|
16
16
|
"dist",
|
|
17
|
-
"registry.json"
|
|
17
|
+
"registry.json",
|
|
18
|
+
"README.md"
|
|
18
19
|
],
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"chalk": "^5.3.0",
|
package/registry.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"updatedAt": "2026-06-
|
|
3
|
+
"updatedAt": "2026-06-28T01:10:10.949Z",
|
|
4
4
|
"templates": {
|
|
5
|
+
"angular-starter": {
|
|
6
|
+
"id": "angular-starter",
|
|
7
|
+
"name": "Angular Starter",
|
|
8
|
+
"language": "typescript",
|
|
9
|
+
"category": "frontend",
|
|
10
|
+
"library": "angular",
|
|
11
|
+
"description": "Angular 17 standalone components with TypeScript and Angular CLI preconfigured.",
|
|
12
|
+
"tags": [
|
|
13
|
+
"angular",
|
|
14
|
+
"typescript",
|
|
15
|
+
"frontend",
|
|
16
|
+
"spa"
|
|
17
|
+
],
|
|
18
|
+
"version": "1.0.0",
|
|
19
|
+
"nextSteps": [
|
|
20
|
+
"npm install",
|
|
21
|
+
"ng serve"
|
|
22
|
+
],
|
|
23
|
+
"path": "templates/typescript/frontend/angular/angular-starter"
|
|
24
|
+
},
|
|
5
25
|
"next-tailwind": {
|
|
6
26
|
"id": "next-tailwind",
|
|
7
27
|
"name": "Next.js + Tailwind",
|
|
@@ -45,12 +65,14 @@
|
|
|
45
65
|
},
|
|
46
66
|
"byLanguage": {
|
|
47
67
|
"typescript": [
|
|
68
|
+
"angular-starter",
|
|
48
69
|
"next-tailwind",
|
|
49
70
|
"nextjs-tailwind"
|
|
50
71
|
]
|
|
51
72
|
},
|
|
52
73
|
"byCategory": {
|
|
53
74
|
"frontend": [
|
|
75
|
+
"angular-starter",
|
|
54
76
|
"next-tailwind"
|
|
55
77
|
],
|
|
56
78
|
"fullstack": [
|
|
@@ -58,6 +80,9 @@
|
|
|
58
80
|
]
|
|
59
81
|
},
|
|
60
82
|
"byLibrary": {
|
|
83
|
+
"angular": [
|
|
84
|
+
"angular-starter"
|
|
85
|
+
],
|
|
61
86
|
"nextjs": [
|
|
62
87
|
"next-tailwind"
|
|
63
88
|
],
|