create-clivly 0.3.0-next.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/LICENSE +21 -0
- package/README.md +39 -0
- package/index.cjs +28 -0
- package/index.d.cts +4 -0
- package/index.d.mts +4 -0
- package/index.mjs +27 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Clivly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# create-clivly
|
|
2
|
+
|
|
3
|
+
Scaffold [Clivly](https://clivly.com) — an embeddable CRM — into your existing
|
|
4
|
+
app. This is the `create-*` entry point for `clivly init`: it runs exactly what
|
|
5
|
+
`clivly init` runs, with the same flags, against a version-pinned `clivly`
|
|
6
|
+
runtime.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm create clivly@latest
|
|
10
|
+
# or
|
|
11
|
+
npx create-clivly
|
|
12
|
+
# or
|
|
13
|
+
pnpm create clivly
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
It writes your `clivly.config.ts`, scaffolds the CRM routes, extends your
|
|
17
|
+
Drizzle schema, and (unless `--no-login`) pairs this machine to your workspace.
|
|
18
|
+
|
|
19
|
+
## Flags
|
|
20
|
+
|
|
21
|
+
These are forwarded straight to `clivly init`:
|
|
22
|
+
|
|
23
|
+
| Flag | Effect |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `--dry-run` | Print the plan and the diff without writing anything |
|
|
26
|
+
| `--force` | Overwrite existing files / `.env` values |
|
|
27
|
+
| `--schema <path>` | Point at your Drizzle schema explicitly |
|
|
28
|
+
| `--no-login` | Skip the browser pairing step |
|
|
29
|
+
| `--no-browser` | Don't auto-open the approval URL |
|
|
30
|
+
|
|
31
|
+
## Relationship to `clivly`
|
|
32
|
+
|
|
33
|
+
- **`create-clivly`** — the scaffolder you run once to set a project up.
|
|
34
|
+
- **`clivly`** — the runtime you import (`import { createClivlySDK } from "clivly/sdk"`) and the CLI you run afterwards (`clivly status`, `clivly dev`, `clivly login`).
|
|
35
|
+
|
|
36
|
+
`create-clivly` pins the `clivly` version it installs, so the scaffolder and the
|
|
37
|
+
runtime never drift.
|
|
38
|
+
|
|
39
|
+
MIT licensed.
|
package/index.cjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let clivly = require("clivly");
|
|
4
|
+
let node_fs = require("node:fs");
|
|
5
|
+
let node_url = require("node:url");
|
|
6
|
+
//#region src/is-entry.ts
|
|
7
|
+
function isEntrypoint(argv1, moduleUrl, realpath = node_fs.realpathSync) {
|
|
8
|
+
if (!argv1) return false;
|
|
9
|
+
const modulePath = (0, node_url.fileURLToPath)(moduleUrl);
|
|
10
|
+
const resolve = (path) => {
|
|
11
|
+
try {
|
|
12
|
+
return realpath(path);
|
|
13
|
+
} catch {
|
|
14
|
+
return path;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return resolve(argv1) === resolve(modulePath);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/index.ts
|
|
21
|
+
function runCreateClivly(argv, cwd = process.cwd()) {
|
|
22
|
+
return (0, clivly.runInitFromArgv)(argv, cwd);
|
|
23
|
+
}
|
|
24
|
+
if (isEntrypoint(process.argv[1], require("url").pathToFileURL(__filename).href)) runCreateClivly(process.argv.slice(2)).then((code) => {
|
|
25
|
+
process.exitCode = code;
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.runCreateClivly = runCreateClivly;
|
package/index.d.cts
ADDED
package/index.d.mts
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { runInitFromArgv } from "clivly";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
//#region src/is-entry.ts
|
|
6
|
+
function isEntrypoint(argv1, moduleUrl, realpath = realpathSync) {
|
|
7
|
+
if (!argv1) return false;
|
|
8
|
+
const modulePath = fileURLToPath(moduleUrl);
|
|
9
|
+
const resolve = (path) => {
|
|
10
|
+
try {
|
|
11
|
+
return realpath(path);
|
|
12
|
+
} catch {
|
|
13
|
+
return path;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return resolve(argv1) === resolve(modulePath);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/index.ts
|
|
20
|
+
function runCreateClivly(argv, cwd = process.cwd()) {
|
|
21
|
+
return runInitFromArgv(argv, cwd);
|
|
22
|
+
}
|
|
23
|
+
if (isEntrypoint(process.argv[1], import.meta.url)) runCreateClivly(process.argv.slice(2)).then((code) => {
|
|
24
|
+
process.exitCode = code;
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { runCreateClivly };
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-clivly",
|
|
3
|
+
"version": "0.3.0-next.3",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Scaffold Clivly into your app — the create-* entry point for `clivly init`.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"bin": {
|
|
9
|
+
"create-clivly": "index.mjs"
|
|
10
|
+
},
|
|
11
|
+
"main": "./index.cjs",
|
|
12
|
+
"module": "./index.mjs",
|
|
13
|
+
"types": "./index.d.mts",
|
|
14
|
+
"files": [
|
|
15
|
+
"*.cjs",
|
|
16
|
+
"*.mjs",
|
|
17
|
+
"*.d.cts",
|
|
18
|
+
"*.d.mts",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md",
|
|
21
|
+
"package.json"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./index.d.mts",
|
|
27
|
+
"default": "./index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./index.d.cts",
|
|
31
|
+
"default": "./index.cjs"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"clivly": "0.3.0-next.3"
|
|
37
|
+
},
|
|
38
|
+
"author": "Joseph Amani",
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/amani-joseph/clivly.com.git",
|
|
45
|
+
"directory": "packages/create-clivly"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://clivly.com",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/amani-joseph/clivly.com/issues"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"crm",
|
|
53
|
+
"cli",
|
|
54
|
+
"create",
|
|
55
|
+
"scaffold",
|
|
56
|
+
"clivly",
|
|
57
|
+
"drizzle",
|
|
58
|
+
"typescript"
|
|
59
|
+
]
|
|
60
|
+
}
|