@solvapay/init 0.2.0-preview-3bd084178827fd5e2d505fed65571405a1520514
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.md +21 -0
- package/README.md +21 -0
- package/dist/index.cjs +937 -0
- package/dist/index.d.cts +130 -0
- package/dist/index.d.ts +130 -0
- package/dist/index.js +880 -0
- package/package.json +50 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 SolvaPay Inc.
|
|
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,21 @@
|
|
|
1
|
+
# @solvapay/init
|
|
2
|
+
|
|
3
|
+
Shared primitives for SolvaPay CLI tooling. Consumed by:
|
|
4
|
+
|
|
5
|
+
- [`solvapay`](https://www.npmjs.com/package/solvapay) — the `solvapay init` CLI for existing projects
|
|
6
|
+
- [`create-solvapay`](https://www.npmjs.com/package/create-solvapay) — the `npm create solvapay` scaffolder
|
|
7
|
+
|
|
8
|
+
## Surface
|
|
9
|
+
|
|
10
|
+
This package exports the building blocks for SolvaPay's CLI flows:
|
|
11
|
+
|
|
12
|
+
- **`runInitInDirectory({ cwd, options })`** — the full init orchestration (browser auth, env writes, optional SDK install, product picker) targeted at a specific directory.
|
|
13
|
+
- Browser-based device-code auth: `createInitSession`, `openAuthUrl`, `waitForExchange`, `verifySecretKey`, `verifyProductRef`.
|
|
14
|
+
- `.env` and `.gitignore` writers: `writeSolvaPaySecretToEnv`, `writeSolvaPayProductRefToEnv`, `ensureEnvInGitignore`, `readSolvaPayProductRefFromEnv`.
|
|
15
|
+
- Product picker: `listProducts`, `pickProductInteractive`, `askKeepConfiguredProduct`, `formatConfiguredProductLabel`.
|
|
16
|
+
- Package-manager helpers: `detectPackageManager`, `installSolvaPaySdk`, `getInstallCommand`, `getSolvaPayBasePackages`.
|
|
17
|
+
- Project helpers: `ensureNodeProject`, `waitForEnter`.
|
|
18
|
+
|
|
19
|
+
## Stability
|
|
20
|
+
|
|
21
|
+
Pre-`1.0.0`. The surface evolves with the consumer CLIs; pin an exact version if you build your own scaffolder against it.
|