@cocreate/api
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,8 @@ | ||
## [1.0.2](https://github.com/CoCreate-app/CoCreate-api/compare/v1.0.1...v1.0.2) (2021-03-29) | ||
### Bug Fixes | ||
* Package Paths ([bb0d1fd](https://github.com/CoCreate-app/CoCreate-api/commit/bb0d1fd343ab2426528c23d643b2632d2c5195b8)) | ||
## [1.0.1](https://github.com/CoCreate-app/CoCreate-api/compare/v1.0.0...v1.0.1) (2021-01-26) | ||
@@ -2,0 +9,0 @@ |
module.exports = { | ||
socket: { | ||
config: { | ||
apiKey: "c2b08663-06e3-440c-ef6f-13978b42883a", | ||
securityKey: "f26baf68-e3a9-45fc-effe-502e47116265", | ||
organization_Id: "5de0387b12e200ea63204d6c" | ||
}, | ||
config: { | ||
apiKey: "c2b08663-06e3-440c-ef6f-13978b42883a", | ||
securityKey: "f26baf68-e3a9-45fc-effe-502e47116265", | ||
organization_Id: "5de0387b12e200ea63204d6c", | ||
host: "server.cocreate.app:8088" | ||
}, | ||
sources: [{ | ||
path: "./docs/index.html", | ||
collection: "website-pages", | ||
document_id: "", | ||
name: "html", | ||
collection: "files", | ||
document_id: "601f02625803e43d00589077", | ||
key: "html", | ||
data:{ | ||
name: "Api Doc", | ||
} | ||
}, | ||
@@ -21,7 +22,9 @@ ], | ||
collection: "routes", | ||
document_id: "", | ||
data:{collection: "website-pages", | ||
document_id: "", | ||
domains: ["general.cocreate.app"], | ||
route: "/docs/boilerplate", | ||
document_id: "601f02625803e43d00589076", | ||
data:{ | ||
collection: "files", | ||
document_id: "601f02625803e43d00589077", | ||
name: "html", | ||
domains: ["cocreate.app", "server.cocreate.app", "ws.cocreate.app"], | ||
route: "/docs/api", | ||
} | ||
@@ -45,2 +48,2 @@ } | ||
} | ||
} | ||
} |
{ | ||
"name": "@cocreate/api", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A simple api helper component in vanilla javascript. Easily intergrate thirdparty apis. Makes thirdparty api accessible using HTML5 data-attributes and/or JavaScript API", | ||
@@ -28,4 +28,5 @@ "keywords": [ | ||
"scripts": { | ||
"start": "npx webpack --config webpack.config.js --watch", | ||
"start": "npx webpack --config webpack.config.js", | ||
"build": "NODE_ENV=production npx webpack --config webpack.config.js", | ||
"dev": "npx webpack --config webpack.config.js --watch", | ||
"docs": "node ./node_modules/@cocreate/docs/src/index.js" | ||
@@ -43,12 +44,20 @@ }, | ||
"homepage": "https://cocreate.app/docs/api", | ||
"funding": { | ||
"type": "GitHub Sponsors ❤", | ||
"url": "https://github.com/sponsors/CoCreate-app" | ||
}, | ||
"main": "./src/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.12.10", | ||
"@babel/preset-env": "^7.12.11", | ||
"babel-loader": "^8.2.2", | ||
"@babel/core": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"babel-loader": "^8.1.0", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"html-webpack-plugin": "^4.5.0", | ||
"uglifyjs-webpack-plugin": "^2.2.0", | ||
"webpack": "^5.14.0", | ||
"webpack-cli": "^4.3.1", | ||
"webpack-log": "^3.0.1" | ||
"webpack": "^5.24.4", | ||
"webpack-cli": "^4.5.0", | ||
"webpack-log": "^3.0.1", | ||
"file-loader": "^6.2.0", | ||
"style-loader": "^2.0.0", | ||
"terser-webpack-plugin": "^5.1.1" | ||
}, | ||
@@ -55,0 +64,0 @@ "dependencies": { |
@@ -13,3 +13,2 @@ # CoCreate-api | ||
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreate-app/Realtime_Admin_CRM_and_CMS/issues) and [pull requests](https://github.com/CoCreate-app/Realtime_Admin_CRM_and_CMS/pulls) or merely upvote or comment on existing issues or pull requests. | ||
@@ -16,0 +15,0 @@ |
@@ -0,1 +1,2 @@ | ||
import api from '@cocreate/api' | ||
@@ -5,5 +6,5 @@ const CoCreateXXX = { | ||
actions: [ | ||
'xxxCreateRequest', | ||
'xxxGetKeysFromBd', | ||
'xxxRender', | ||
'xxxCreateCard' | ||
'xxxCreateCard', | ||
], | ||
@@ -35,3 +36,3 @@ | ||
render_xxxCreateRequest: function(data) { | ||
render_xxxGetKeysFromBd: function(data) { | ||
console.log(JSON.stringify(data)); | ||
@@ -61,8 +62,12 @@ }, | ||
//. data rendering by cocreate-render | ||
CoCreateApi.render(this.id, 'xxxCreateCard', {render2: data}); | ||
} | ||
// END CreacteCard endpoint | ||
api.render(this.id, 'xxxCreateCard', {render2: data}); | ||
}, | ||
} | ||
api.init({ | ||
name: CoCreateXXX.id, | ||
module: CoCreateXXX | ||
}) | ||
CoCreateApi.register(CoCreateXXX.id, CoCreateXXX); | ||
export default CoCreateXXX; |
@@ -1,29 +0,27 @@ | ||
// Webpack uses this to work with directories | ||
const path = require('path'); | ||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | ||
// const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
// const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
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") | ||
let isProduction = process.env.NODE_ENV === 'production'; | ||
// This is main configuration object. | ||
// Here you write different options and tell Webpack what to do | ||
module.exports = { | ||
// Path to your entry point. From this file Webpack will begin his work | ||
entry: { | ||
'CoCreate-api': './src/CoCreate-api.js', | ||
"CoCreate-api": "./src/index.js", | ||
}, | ||
// Path and filename of your result bundle. | ||
// Webpack will bundle all JavaScript into this file | ||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: isProduction ? '[name].min.js' : '[name].js', | ||
libraryTarget: 'umd', | ||
libraryExport: 'default', | ||
library: 'CoCreateApi', | ||
path: path.resolve(__dirname, "dist"), | ||
filename: isProduction ? "[name].min.js" : "[name].js", | ||
libraryTarget: "umd", | ||
libraryExport: "default", | ||
library: ["CoCreate", "api"], | ||
globalObject: "this", | ||
// publicPath: 'https://server.cocreate.app/CoCreateJS/dist/' | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin(), | ||
new MiniCssExtractPlugin({ | ||
filename: "[name].css", | ||
}), | ||
], | ||
// Default mode for Webpack is production. | ||
@@ -33,30 +31,56 @@ // Depending on mode Webpack will apply different things | ||
// minifying and other thing so let's set mode to development | ||
mode: isProduction ? 'production' : 'development', | ||
mode: isProduction ? "production" : "development", | ||
module: { | ||
rules: [{ | ||
test: /\.js$/, | ||
rules: [ | ||
{ | ||
test: /.js$/, | ||
exclude: /(node_modules)/, | ||
use: { | ||
loader: 'babel-loader', | ||
loader: "babel-loader", | ||
options: { | ||
presets: ['@babel/preset-env'] | ||
} | ||
} | ||
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' }), | ||
...(isProduction ? {} : { devtool: "eval-source-map" }), | ||
// add uglifyJs | ||
optimization: { | ||
minimizer: [new UglifyJsPlugin({ | ||
uglifyOptions: { | ||
// get options: https://github.com/mishoo/UglifyJS | ||
drop_console: isProduction | ||
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, | ||
}, | ||
})], | ||
}, | ||
}, | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170309
36
836
12
1
80
54
2