@surph_ai/sdk 0.0.1 → 0.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 (3) hide show
  1. package/auth/index.js +2 -2
  2. package/index.js +11 -11
  3. package/package.json +2 -2
package/auth/index.js CHANGED
@@ -38,7 +38,7 @@ module.exports = {
38
38
  },
39
39
 
40
40
  isLoggedIn: () => {
41
- const userProfilePath = path.join(os.homedir(), '.vinely_user')
41
+ const userProfilePath = path.join(os.homedir(), '.surph_user')
42
42
  if (!fs.existsSync(userProfilePath)) {
43
43
  return false
44
44
  }
@@ -78,7 +78,7 @@ module.exports = {
78
78
 
79
79
  currentUser: () => {
80
80
  return new Promise((resolve, reject) => {
81
- const userProfilePath = path.join(os.homedir(), '.vinely_user')
81
+ const userProfilePath = path.join(os.homedir(), '.surph_user')
82
82
  if (!fs.existsSync(userProfilePath)) {
83
83
  // Not logged in
84
84
  resolve(false);
package/index.js CHANGED
@@ -53,7 +53,7 @@ program.command('version')
53
53
  .description('show current version')
54
54
  .action((cmd, options) => {
55
55
  try {
56
- const text = `${colors.cyan(`\nVinely CLI Version: `)} ${colors.brightGreen(`${VERSION}`)}\n`
56
+ const text = `${colors.cyan(`\nSurph Version: `)} ${colors.brightGreen(`${VERSION}`)}\n`
57
57
  console.log(text)
58
58
  } catch (error) {
59
59
  // console.log(colors.red('\nError: '+err.message+'\n'))
@@ -62,7 +62,7 @@ program.command('version')
62
62
  })
63
63
 
64
64
  program.command('profile')
65
- .description('Current Vinely user')
65
+ .description('Current Surph user')
66
66
  .action(async (cmd, options) => {
67
67
  const user = await auth.currentUser()
68
68
  if (user === false) {
@@ -75,7 +75,7 @@ program.command('profile')
75
75
  })
76
76
 
77
77
  program.command('login')
78
- .description('login to Vinely')
78
+ .description('login to Surph')
79
79
  .action(async (cmd, options) => {
80
80
  try {
81
81
  const credentials = await auth.showPrompt()
@@ -91,7 +91,7 @@ program.command('login')
91
91
  const user = { id: data._id, username: data.username }
92
92
 
93
93
  shell.cd('')
94
- utils.write('.vinely_user', JSON.stringify(user, null, 2) + '\n')
94
+ utils.write('.Surph_user', JSON.stringify(user, null, 2) + '\n')
95
95
 
96
96
  const successText = `${colors.cyan(`\nSuccess! `)} ${colors.brightGreen(`Currently Logged In As ${user.username}\n`)}`
97
97
  console.log(successText)
@@ -105,9 +105,9 @@ program.command('dev')
105
105
  .action(async (cmd, options) => {
106
106
  try {
107
107
  // shell.cp('-R', path.join(__dirname, '../default/lambda/js/index.js'), 'vectors/js/index.js')
108
- shell.cd(path.join(__dirname, 'base/vinely-base'))
108
+ shell.cd(path.join(__dirname, 'base/Surph-base'))
109
109
  shell.exec('npm run dev')
110
- // shell.cd('vinely-base')
110
+ // shell.cd('Surph-base')
111
111
 
112
112
  // shell.exec('gulp build --gulpfile node_modules/@turbo360/turbo-sdk/src/gulpfile.js --silent')
113
113
 
@@ -117,11 +117,11 @@ program.command('dev')
117
117
  })
118
118
 
119
119
  program.command('new <name>')
120
- .description('create new Vinely app')
120
+ .description('create new Surph app')
121
121
  .action(name => scaffold(name, 'project'))
122
122
 
123
123
  program.command('connect')
124
- .description('Connect to Vinely project')
124
+ .description('Connect to Surph project')
125
125
  .action(async (cmd, options) => {
126
126
  try {
127
127
  const user = await auth.currentUser() // must be logged in.
@@ -202,7 +202,7 @@ program.command('connect')
202
202
  })
203
203
 
204
204
  program.command('build')
205
- .description('compile Vinely app')
205
+ .description('compile Surph app')
206
206
  .action(name => {
207
207
  shell.exec('gulp build --gulpfile node_modules/@turbo360/turbo-sdk/src/gulpfile.js --silent')
208
208
 
@@ -214,7 +214,7 @@ program.command('build')
214
214
 
215
215
  program.command('deploy')
216
216
  .option('-t, --type <default_or_static>', 'deployment type | static or default', 'default') // https://www.npmjs.com/package/commander#default-option-value
217
- .description('Deploy to Vinely')
217
+ .description('Deploy to Surph')
218
218
  .action(async (cmd, options) => {
219
219
  try {
220
220
  const { type } = cmd
@@ -236,7 +236,7 @@ program.command('deploy')
236
236
  } = dotenv.parse(utils.readFile('.env') ?? '')
237
237
 
238
238
  if (TURBO_PROJECT === null || TURBO_PROJECT_SLUG === null) {
239
- program.error('Vinely project not connected. To connect, run:\n\n$ vly connect',
239
+ program.error('Surph project not connected. To connect, run:\n\n$ vly connect',
240
240
  ERRORS.PROJECT_NOT_CONNECTED)
241
241
  }
242
242
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@surph_ai/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
- "publishConfig": {
6
+ "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {