New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flydotio/dockerfile

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flydotio/dockerfile - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

56

fly.js
import crypto from 'node:crypto'
import fs from 'node:fs'
import inquirer from 'inquirer'
import path from 'node:path'

@@ -12,3 +13,3 @@ import { execSync } from 'node:child_process'

GDF.extend(class extends GDF {
run() {
async run() {
if (!this.flySetup()) return

@@ -31,4 +32,7 @@

if (this.shopify) {
this.flyShopifyEnv(this.flyApp)
this.flyShopifyConfig(this.flyApp)
const shopifyConfig = await this.selectShopifyConfig()
if (shopifyConfig) {
this.flyShopifyEnv(this.flyApp, shopifyConfig)
this.flyShopifyConfig(this.flyApp, shopifyConfig)
}
} else if (this.remix) {

@@ -316,7 +320,37 @@ this.flyRemixSecrets(this.flyApp)

async selectShopifyConfig() {
// Search for both shopify.app.toml and shopify.app.*.toml
const files = fs.readdirSync('.')
.filter(file => file.startsWith('shopify.app.') && file.endsWith('.toml'))
.sort()
if (files.length === 0) {
return null
}
if (files.length === 1) {
return files[0]
}
// Multiple files found, prompt user to select one
const { selectedFile } = await inquirer.prompt([
{
type: 'list',
name: 'selectedFile',
message: 'Multiple configuration files found. Please select one:',
choices: files.map(file => ({
name: file,
value: file
}))
}
])
return selectedFile
}
// set environment and secrets for Shopify apps
flyShopifyEnv(app) {
flyShopifyEnv(app, configFile) {
let toml = ''
if (fs.existsSync('shopify.app.toml')) {
toml = fs.readFileSync('shopify.app.toml', 'utf-8')
if (fs.existsSync(configFile)) {
toml = fs.readFileSync(configFile, 'utf-8')
}

@@ -326,3 +360,3 @@

this.setExit(42)
console.log(`${chalk.bold.red('shopify.app.toml')} is not complete; run ${chalk.bold.blue('shopify app config create')} first.`)
console.log(`${chalk.bold.red(configFile)} is not complete; run ${chalk.bold.blue('shopify app config create')} first.`)
return

@@ -337,3 +371,3 @@ }

try {
console.log(`${chalk.bold.green('execute'.padStart(11))} shopify app env show`)
console.log(`${chalk.bold.green('execute'.padStart(11))} shopify app env show --config ${configFile}`)
const stdout = execSync('shopify app env show', { encoding: 'utf8' })

@@ -356,4 +390,4 @@ for (const match of stdout.matchAll(/^\s*(\w+)=(.*)/mg)) {

// update config for Shopify apps
flyShopifyConfig(app) {
const original = fs.readFileSync('shopify.app.toml', 'utf-8')
flyShopifyConfig(app, configFile) {
const original = fs.readFileSync(configFile, 'utf-8')
const url = `https://${app}.fly.dev`

@@ -365,3 +399,3 @@ const config = original.replaceAll(/"https:\/\/[-\w.]+/g, '"' + url)

console.log(`${chalk.bold.green('update'.padStart(11, ' '))} shopify.app.toml`)
fs.writeFileSync('shopify.app.toml', config)
fs.writeFileSync(configFile, config)
console.log(`${chalk.bold.green('execute'.padStart(11))} shopify app deploy --force`)

@@ -368,0 +402,0 @@ execSync('shopify app deploy --force', { stdio: 'inherit' })

2

gdf.js

@@ -1045,3 +1045,3 @@ import fs from 'node:fs'

for (const runner of GDF.runners) {
runner.apply(this)
await runner.apply(this)
}

@@ -1048,0 +1048,0 @@

{
"name": "@flydotio/dockerfile",
"version": "0.7.5",
"version": "0.7.6",
"description": "Dockerfile generator",

@@ -25,2 +25,3 @@ "main": "./index.js",

"ejs": "^3.1.10",
"inquirer": "^12.4.1",
"shell-quote": "^1.8.2",

@@ -27,0 +28,0 @@ "yargs": "^17.7.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc