Skip to content

Commit

Permalink
fix(sandbox): build sandbox docker-compose file without error
Browse files Browse the repository at this point in the history
  • Loading branch information
arpit1503khanna committed Apr 2, 2024
1 parent a276aea commit 73376e5
Show file tree
Hide file tree
Showing 30 changed files with 1,868 additions and 55,199 deletions.
39 changes: 32 additions & 7 deletions packages/cli/src/generators/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,53 @@ export default class UpdateGenerator extends BaseUpdateGenerator<UpdateOptions>
}

async updateAllProjects() {
const types = ['facades', 'services', 'packages'];
const types = [
'facades',
'services',
'packages',
'sandbox',
'sandbox/chat-notification-pubnub-example/facade',
'sandbox/chat-notification-pubnub-example/services/chat-service',
'sandbox/chat-notification-pubnub-example/services/notifications-service',
'sandbox/chat-notification-socketio-example/facade',
'sandbox/chat-notification-socketio-example/services/chat-service',
'sandbox/chat-notification-socketio-example/services/notifications-service',
'sandbox/chat-notification-socketio-example/services/socketio-service',
'sandbox/telemed-app/backend/authentication-service',
'sandbox/telemed-app/backend/notification-service',
'sandbox/telemed-app/backend/video-conferencing-service',
];
const monoRepo = this.destinationPath();

const ignore = [
'custom-sf-changelog',
'@sourceloop/ocr-parser',
'@sourceloop/search-client',
'@sourceloop/user-onboarding-client',
'@sourceloop/ocr-service',
'@sourceloop/ocr-s3-service',
'@sourceloop/cli',
];
for (const type of types) {
this.destinationRoot(monoRepo);
const folders = await this._getDirectories(
const folders = this._getDirectories(
this.destinationRoot(join('.', type)),
);
for (const folder of folders) {
for (const folder of await folders) {
this.destinationRoot(join(monoRepo, type, folder));

const pkgJs = this.fs.readJSON(
this.destinationPath(packageJsonFile),
) as AnyObject;

if (pkgJs) {
const ignoredPackage = ignore.find(pack => pack === pkgJs.name);
if (ignoredPackage) {
this.log(chalk.yellow(`Ignoring - ${pkgJs.name}`));
continue;
}
this.log(
chalk.cyan(
`Updating dependencies in the following project- ${pkgJs.name}`,
),
);

await this._updateSourceloopDep();
}
}
Expand Down
172 changes: 86 additions & 86 deletions sandbox/audit-ms-example/package.json
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
{
"name": "@sourceloop/audit-ms-example",
"version": "0.7.12",
"description": "An audit microservice example",
"keywords": [
"loopback-application",
"loopback"
],
"private": true,
"main": "dist/index.js",
"types": "dist/index.d.ts",
"engines": {
"node": "18 || 20"
},
"scripts": {
"build": "npm run clean && lb-tsc",
"build:watch": "lb-tsc --watch",
"lint": "npm run eslint && npm run prettier:check",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run rebuild",
"test": "echo 'No Tests'",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"docker:build": "docker build -t audit-example .",
"docker:run": "docker run -p 3000:3000 -d audit-example",
"premigrate": "npm run build",
"migrate": "node migration.js",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node -r source-map-support/register .",
"clean": "lb-clean dist *.tsbuildinfo .eslintcache",
"db:migrate": "./node_modules/db-migrate/bin/db-migrate up --config './migrations/database.json'",
"db:migrate:down": "./node_modules/db-migrate/bin/db-migrate down --config './migrations/database.json'",
"db:migrate:reset": "./node_modules/db-migrate/bin/db-migrate reset --config './migrations/database.json'"
},
"repository": {
"type": "git",
"url": ""
},
"author": "Akshat Dubey <[email protected]>",
"license": "MIT",
"files": [
"README.md",
"dist",
"src",
"!*/__tests__"
],
"dependencies": {
"@loopback/boot": "^6.1.5",
"@loopback/context": "^6.1.5",
"@loopback/core": "^5.1.5",
"@loopback/repository": "^6.1.5",
"@loopback/rest": "^13.1.5",
"@loopback/rest-explorer": "^6.1.5",
"@loopback/service-proxy": "^6.1.5",
"@sourceloop/audit-log": "^5.3.1",
"@sourceloop/audit-service": "^12.0.0",
"@sourceloop/core": "^13.0.0",
"ajv": "^8.11.0",
"ajv-errors": "^3.0.0",
"db-migrate": "^1.0.0-beta.21",
"db-migrate-pg": "^1.3.0",
"dotenv": "^16.0.3",
"dotenv-extended": "^2.9.0",
"loopback-connector-postgresql": "^7.0.2",
"loopback4-authentication": "^11.0.2",
"loopback4-authorization": "^6.2.1",
"loopback4-soft-delete": "^9.1.1",
"prom-client": "^14.0.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@loopback/build": "^10.1.5",
"@loopback/eslint-config": "^14.0.4",
"@loopback/testlab": "^6.1.5",
"@types/node": "^18.11.9",
"eslint": "^8.44.0",
"source-map-support": "^0.5.21",
"typescript": "~4.9.5"
}
}
"name": "@sourceloop/audit-ms-example",
"version": "0.7.12",
"description": "An audit microservice example",
"keywords": [
"loopback-application",
"loopback"
],
"private": true,
"main": "dist/index.js",
"types": "dist/index.d.ts",
"engines": {
"node": "18 || 20"
},
"scripts": {
"build": "npm run clean && lb-tsc",
"build:watch": "lb-tsc --watch",
"lint": "npm run eslint && npm run prettier:check",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run rebuild",
"test": "echo 'No Tests'",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"docker:build": "docker build -t audit-example .",
"docker:run": "docker run -p 3000:3000 -d audit-example",
"premigrate": "npm run build",
"migrate": "node migration.js",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node -r source-map-support/register .",
"clean": "lb-clean dist *.tsbuildinfo .eslintcache",
"db:migrate": "./node_modules/db-migrate/bin/db-migrate up --config './migrations/database.json'",
"db:migrate:down": "./node_modules/db-migrate/bin/db-migrate down --config './migrations/database.json'",
"db:migrate:reset": "./node_modules/db-migrate/bin/db-migrate reset --config './migrations/database.json'"
},
"repository": {
"type": "git",
"url": ""
},
"author": "Akshat Dubey <[email protected]>",
"license": "MIT",
"files": [
"README.md",
"dist",
"src",
"!*/__tests__"
],
"dependencies": {
"@loopback/boot": "^7.0.0",
"@loopback/context": "^7.0.0",
"@loopback/core": "^6.0.0",
"@loopback/repository": "^7.0.0",
"@loopback/rest": "^14.0.0",
"@loopback/rest-explorer": "^7.0.0",
"@loopback/service-proxy": "^7.0.0",
"@sourceloop/audit-log": "^7.0.0",
"@sourceloop/audit-service": "^12.0.0",
"@sourceloop/core": "^13.0.0",
"ajv": "^8.11.0",
"ajv-errors": "^3.0.0",
"db-migrate": "^1.0.0-beta.21",
"db-migrate-pg": "^1.3.0",
"dotenv": "^16.0.3",
"dotenv-extended": "^2.9.0",
"loopback-connector-postgresql": "^7.0.4",
"loopback4-authentication": "^12.0.0",
"loopback4-authorization": "^7.0.0",
"loopback4-soft-delete": "^10.0.0",
"prom-client": "^14.0.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@loopback/build": "^11.0.0",
"@loopback/eslint-config": "^15.0.0",
"@loopback/testlab": "^7.0.0",
"@types/node": "^18.11.9",
"eslint": "^8.44.0",
"source-map-support": "^0.5.21",
"typescript": "~4.9.5"
}
}
Loading

0 comments on commit 73376e5

Please sign in to comment.