@rimelight/cli 0.0.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 +19 -0
- package/bin/rimelight.js +78 -0
- package/package.json +44 -0
- package/src/index.js +1305 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Rimelight Entertainment Workspace
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
### Apps (`/packages`)
|
|
6
|
+
|
|
7
|
+
- **`rimelight.com`**: The main company website.
|
|
8
|
+
- **`starter.rimelight.com`**: Our standardized starter template for Astro websites.
|
|
9
|
+
|
|
10
|
+
### Packages (`/packages`)
|
|
11
|
+
|
|
12
|
+
- **`@rimelight/auth`**: Authentication and authorization utilities for the Rimelight ecosystem.
|
|
13
|
+
- **`@rimelight/cli`**: The command line interface for managing Rimelight projects.
|
|
14
|
+
- **`@rimelight/cms`**: Enterprise content management, block rendering, and wiki engine.
|
|
15
|
+
- **`@rimelight/docs`**: Documentation components and utilities.
|
|
16
|
+
- **`@rimelight/i18n`**: Internationalization and localization tools.
|
|
17
|
+
- **`@rimelight/security`**: Astro security integration (CSP, SRI, and more).
|
|
18
|
+
- **`@rimelight/seo`**: SEO utilities including sitemap, robots, and meta components.
|
|
19
|
+
- **`@rimelight/ui`**: Our component library used in all our web projects.
|
package/bin/rimelight.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import mri from "mri"
|
|
4
|
+
import { runCreate } from "../src/index.js"
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
const args = process.argv.slice(2)
|
|
8
|
+
const parsed = mri(args, {
|
|
9
|
+
alias: {
|
|
10
|
+
h: "help",
|
|
11
|
+
v: "version",
|
|
12
|
+
g: "git",
|
|
13
|
+
i: "install",
|
|
14
|
+
d: "domain"
|
|
15
|
+
},
|
|
16
|
+
boolean: ["help", "version", "git", "install"],
|
|
17
|
+
string: ["package-manager", "domain"]
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
if (parsed.version) {
|
|
21
|
+
console.log("rimelight v0.1.0")
|
|
22
|
+
process.exit(0)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (parsed.help) {
|
|
26
|
+
console.log(`
|
|
27
|
+
Rimelight CLI - Manage and scaffold premium Rimelight projects.
|
|
28
|
+
|
|
29
|
+
Usage:
|
|
30
|
+
rimelight create [project-name] [options]
|
|
31
|
+
rimelight compare [project-path]
|
|
32
|
+
rimelight update [project-path]
|
|
33
|
+
|
|
34
|
+
Commands:
|
|
35
|
+
create Scaffold a new project from the reference template
|
|
36
|
+
compare Compare target project configurations against starter baseline
|
|
37
|
+
update Standardize target project configs to match starter baseline
|
|
38
|
+
|
|
39
|
+
Options:
|
|
40
|
+
-d, --domain Specify website domain (e.g. example.com)
|
|
41
|
+
-g, --git Initialize a Git repository (default: auto)
|
|
42
|
+
-i, --install Automatically install dependencies (default: auto)
|
|
43
|
+
--package-manager Force a package manager (npm, pnpm, yarn, bun)
|
|
44
|
+
-h, --help Show this help screen
|
|
45
|
+
-v, --version Show CLI version
|
|
46
|
+
`)
|
|
47
|
+
process.exit(0)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const command = parsed._[0]
|
|
51
|
+
|
|
52
|
+
if (command === "compare") {
|
|
53
|
+
const targetDir = parsed._[1] || "."
|
|
54
|
+
const { runCompare } = await import("../src/index.js")
|
|
55
|
+
await runCompare({ targetDir })
|
|
56
|
+
} else if (command === "update") {
|
|
57
|
+
const targetDir = parsed._[1] || "."
|
|
58
|
+
const { runUpdate } = await import("../src/index.js")
|
|
59
|
+
await runUpdate({ targetDir })
|
|
60
|
+
} else if (!command || command === "create") {
|
|
61
|
+
const projectName = command === "create" ? parsed._[1] : parsed._[0]
|
|
62
|
+
await runCreate({
|
|
63
|
+
projectName,
|
|
64
|
+
domain: parsed.domain,
|
|
65
|
+
git: parsed.git,
|
|
66
|
+
install: parsed.install,
|
|
67
|
+
packageManager: parsed["package-manager"]
|
|
68
|
+
})
|
|
69
|
+
} else {
|
|
70
|
+
console.error(`Unknown command: ${command}. Use "rimelight --help" to see all options.`)
|
|
71
|
+
process.exit(1)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
main().catch((err) => {
|
|
76
|
+
console.error("An unexpected error occurred:", err)
|
|
77
|
+
process.exit(1)
|
|
78
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rimelight/cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Rimelight Entertainment's Command Line Interface",
|
|
6
|
+
"homepage": "https://rimelight.com/docs",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/Rimelight-Entertainment/rimelight/issues"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Rimelight Entertainment"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/Rimelight-Entertainment/rimelight.git"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"rimelight": "./bin/rimelight.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"src"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./src/index.js",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"create": "node ./bin/rimelight.js create",
|
|
32
|
+
"check": "pnpm audit --audit-level=moderate"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@clack/prompts": "1.7.0",
|
|
36
|
+
"cross-spawn": "7.0.6",
|
|
37
|
+
"mri": "1.2.0",
|
|
38
|
+
"picocolors": "1.1.1"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=26.7.0"
|
|
42
|
+
},
|
|
43
|
+
"packageManager": "pnpm@11.22.0"
|
|
44
|
+
}
|