create-moncircle 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/index.js +3 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -139,10 +139,7 @@ function writeFreshEnv(values) {
139
139
  }
140
140
 
141
141
  function sdkIsInstalled() {
142
- try {
143
- const pkg = JSON.parse(fs.readFileSync(PKG_PATH, "utf-8"))
144
- return !!(pkg.dependencies?.["@moncircle/sdk"] || pkg.devDependencies?.["@moncircle/sdk"])
145
- } catch { return false }
142
+ return fs.existsSync(path.join(process.cwd(), "node_modules", "@moncircle", "sdk"))
146
143
  }
147
144
 
148
145
  async function main() {
@@ -191,8 +188,8 @@ async function main() {
191
188
  console.log(`${GREEN}${BOLD} ✅ .env created successfully!${RESET}\n`)
192
189
  }
193
190
 
194
- // Auto-install @moncircle/sdk if not in package.json
195
- if (!sdkIsInstalled() && fs.existsSync(PKG_PATH)) {
191
+ // Auto-install @moncircle/sdk if not in node_modules
192
+ if (!sdkIsInstalled()) {
196
193
  console.log(` ${YELLOW}Installing @moncircle/sdk...${RESET}`)
197
194
  try {
198
195
  execSync("npm install @moncircle/sdk --save", { stdio: "inherit", cwd: process.cwd() })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-moncircle",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Interactive setup wizard for @moncircle/sdk — run via npx create-moncircle",
5
5
  "bin": {
6
6
  "create-moncircle": "index.js"