Socket
Socket
Sign inDemoInstall

@cocreate/cli

Package Overview
Dependencies
Maintainers
1
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/cli - npm Package Compare versions

Comparing version 1.35.2 to 1.36.0

17

CHANGELOG.md

@@ -0,1 +1,18 @@

# [1.36.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.35.2...v1.36.0) (2023-08-16)
### Bug Fixes
* comment out creating pwa symlink in admin and website ([03231cc](https://github.com/CoCreate-app/CoCreate-cli/commit/03231cca9a699cf207d5773538fd9d0d5f7c2c92))
* crud attributes renamed ([381f3a0](https://github.com/CoCreate-app/CoCreate-cli/commit/381f3a0f01fb2b816a48a5e53dd5f059a153e754))
* Refactored *-target to *-selector ([6b66d9a](https://github.com/CoCreate-app/CoCreate-cli/commit/6b66d9ae0ed84c52385fcea6e6a6849dc23186dd))
* Remove unnecessary dependencies from CoCreate.config.js ([8463408](https://github.com/CoCreate-app/CoCreate-cli/commit/8463408415aa6d13e1ebbfa6c57629adc2ecc2f6))
* webpack.config and package.json make use of mode=production instead of process.env ([bb6d483](https://github.com/CoCreate-app/CoCreate-cli/commit/bb6d483f062a1220417b4ed178db1d13e56740ad))
### Features
* create symlink for service worker, offline page, and manifest ([eaad236](https://github.com/CoCreate-app/CoCreate-cli/commit/eaad2369868c07293617dfb8f34e26252e75f6e9))
* name attribute and variable renamed to key ([3dec7ba](https://github.com/CoCreate-app/CoCreate-cli/commit/3dec7baffd61cb3200158e85f36070c00a362eb3))
## [1.35.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.35.1...v1.35.2) (2023-06-16)

@@ -2,0 +19,0 @@

21

CoCreate.config.js

@@ -7,4 +7,4 @@ module.exports = {

{
"collection": "files",
"document": {
"array": "files",
"object": {
"_id": "637ca36250234ef1671ce30f",

@@ -127,6 +127,2 @@ "name": "index.html",

{
'path': '../CoCreate-fetch',
'repo': 'github.com/CoCreate-app/CoCreate-fetch.git'
},
{
'path': '../CoCreate-file',

@@ -144,6 +140,2 @@ 'repo': 'github.com/CoCreate-app/CoCreate-file.git'

{
'path': '../CoCreate-form',
'repo': 'github.com/CoCreate-app/CoCreate-form.git'
},
{
'path': '../CoCreate-fullscreen',

@@ -225,6 +217,2 @@ 'repo': 'github.com/CoCreate-app/CoCreate-fullscreen.git'

{
'path': '../CoCreate-render-json',
'repo': 'github.com/CoCreate-app/CoCreate-render-json.git'
},
{
'path': '../CoCreate-resize',

@@ -421,8 +409,3 @@ 'repo': 'github.com/CoCreate-app/CoCreate-resize.git'

},
{
'path': '../../CoCreate-plugins/CoCreate-uppy',
'repo': 'github.com/CoCreate-app/CoCreate-uppy.git'
},
// {

@@ -429,0 +412,0 @@ // 'path': '../CoCreateApi',

{
"name": "@cocreate/cli",
"version": "1.35.2",
"version": "1.36.0",
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -17,3 +17,3 @@ let glob = require("glob");

let name = path.basename(path.resolve(path.dirname(MdPath), './')).substring(9);
let document_id = '';
let object = '';
let replaceContent = fs.readFileSync(MdPath).toString();

@@ -23,5 +23,5 @@

let content_source = replaceContent.substring(replaceContent.indexOf("sources"));
let content1 = content_source.substring(content_source.indexOf("document_id"));
let content1 = content_source.substring(content_source.indexOf("object"));
let content2 = content1.substring(content1.indexOf(':'));
document_id = content2.substring(3, content2.indexOf(',') - 4);
object = content2.substring(3, content2.indexOf(',') - 4);

@@ -38,5 +38,5 @@

{
"collection": "files",
"document": {
"_id": "${document_id}",
"array": "files",
"object": {
"_id": "${object}",
"name": "index.html",

@@ -60,8 +60,8 @@ "path": "/docs/${name}/index.html",

if (!document_id.length)
console.log("Document_id Undefined: ", MdPath);
if (document_id.length != 24 && document_id.length != 0)
console.log("Document_id not valid! please check your config: ", MdPath);
if (!object.length)
console.log("object Undefined: ", MdPath);
if (object.length != 24 && object.length != 0)
console.log("object not valid! please check your config: ", MdPath);
else {
console.log(MdPath, " -> document_id : ", document_id);
console.log(MdPath, " -> object : ", object);
if (fs.existsSync(MdPath))

@@ -68,0 +68,0 @@ fs.unlinkSync(MdPath);

@@ -36,5 +36,17 @@ const fs = require('fs')

symlink('./src/assets', '../assets', 'dir')
symlink('./src/manifest.webmanifest', '../manifest.webmanifest', 'file')
symlink('./src/sw.js', '../sw.js', 'file')
symlink('./src/offline.html', '../offline.html', 'file')
symlink('./dist/service-worker.js', '../../service-worker.js', 'file')
// symlink('./dist/service-worker.js', '../../CoCreate-admin/src/service-worker.js', 'file')
// symlink('./dist/service-worker.js', '../../CoCreate-website/src/service-worker.js', 'file')
symlink('./demo/offline.html', '../../offline.html', 'file')
// symlink('./demo/offline.html', '../../CoCreate-admin/src/offline.html', 'file')
// symlink('./demo/offline.html', '../../CoCreate-website/src/offline.html', 'file')
symlink('./demo/manifest.webmanifest', '../../manifest.webmanifest', 'file')
// symlink('./demo/manifest.webmanifest', '../../CoCreate-admin/src/manifest.webmanifest', 'file')
// symlink('./demo/manifest.webmanifest', '../../CoCreate-website/src/manifest.webmanifest', 'file')
// symlink('./demo/manifest-assets', '../../manifest-assets', 'dir')
// symlink('./demo/manifest-assets', '../../CoCreate-admin/manifest-assets', 'dir')
// symlink('./demo/manifest-assets', '../../CoCreate-website/manifest-assets', 'dir')
const path = require("path")
const TerserPlugin = require("terser-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
let isProduction = process.env.NODE_ENV === "production"
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
module.exports = {
entry: {
"CoCreate-cli": "./src/index.js",
},
output: {
path: path.resolve(__dirname, "dist"),
filename: isProduction ? "[name].min.js" : "[name].js",
libraryTarget: "umd",
libraryExport: "default",
library: ["CoCreate", "cli"],
globalObject: "this",
},
module.exports = (env, argv) => {
let isProduction = false
if (argv.mode === 'production')
isProduction = true
plugins: [
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
// Default mode for Webpack is production.
// Depending on mode Webpack will apply different things
// on final bundle. For now we don't need production's JavaScript
// minifying and other thing so let's set mode to development
mode: isProduction ? "production" : "development",
module: {
rules: [
{
test: /.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
plugins: ["@babel/plugin-transform-modules-commonjs"],
},
const config = {
entry: {
"CoCreate-cli": "./src/index.js",
},
},
{
test: /.css$/i,
use: [
{ loader: "style-loader", options: { injectType: "linkTag" } },
"file-loader",
output: {
path: path.resolve(__dirname, "dist"),
filename: isProduction ? "[name].min.js" : "[name].js",
libraryTarget: "umd",
libraryExport: "default",
library: ["CoCreate", "cli"],
globalObject: "this",
},
plugins: [
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
},
],
},
// Default mode for Webpack is production.
// Depending on mode Webpack will apply different things
// on final bundle. For now we don't need production's JavaScript
// minifying and other thing so let's set mode to development
mode: isProduction ? "production" : "development",
module: {
rules: [
{
test: /.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
plugins: ["@babel/plugin-transform-modules-commonjs"],
},
},
},
{
test: /.css$/i,
use: [
{ loader: "style-loader", options: { injectType: "linkTag" } },
"file-loader",
],
},
],
},
// add source map
...(isProduction ? {} : { devtool: "eval-source-map" }),
// add source map
...(isProduction ? {} : { devtool: "eval-source-map" }),
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: true,
// cache: true,
parallel: true,
// sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
// extractComments: 'all',
compress: {
drop_console: true,
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: true,
// cache: true,
parallel: true,
// sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
// extractComments: 'all',
compress: {
drop_console: true,
},
},
}),
],
splitChunks: {
chunks: "all",
minSize: 200,
// maxSize: 99999,
//minChunks: 1,
cacheGroups: {
defaultVendors: false,
},
},
},
}),
],
splitChunks: {
chunks: "all",
minSize: 200,
// maxSize: 99999,
//minChunks: 1,
cacheGroups: {
defaultVendors: false,
},
},
},
}
}
return config
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc