Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit 303a78a

Browse files
authored
Merge pull request #37 from SqueezerIO/v1.1.14
V1.1.14
2 parents 89731a7 + ea6ad7b commit 303a78a

10 files changed

Lines changed: 108 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## v1.1.14 - 2017-07-06
2+
- fixed CORS issues
3+
- added "Edit On Github" docs support
4+
5+
## v1.1.13 - 2017-07-01
6+
- aws profile config issue
7+
- create project steps
8+
19
## v1.1.12 - 2017-05-12
210
- npm issues on listing html images
311

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You can get various templates for creating a quick project stub :
6161
| template | description | |
6262
|-----|--------------|-------|
6363
|aws-api-nodejs|AWS generic API Hello World template
64-
|aws-api-nodejs-rest|AWS NodeJS REST API template + DynamoDB + Swagger support
64+
|aws-api-nodejs-rest|AWS NodeJS REST API template + DynamoDB + Swagger support|[demo](https://s3.amazonaws.com/squeezer-projects/swagger-ui/index.html?url=https://s3.amazonaws.com/squeezer-projects/api-docs.json)
6565
|aws-web-nodejs-reactjs|AWS NodeJS WebApp template + Pug ( ex-Jade ) + ReactJS support + Material UI + Bootstrap 3 styling|[demo](https://dg3eevr06b.execute-api.us-east-1.amazonaws.com/dev)
6666

6767

@@ -91,7 +91,7 @@ NOTE: **Windows** users should [enable symlinks](http://answers.perforce.com/art
9191

9292
| | cmd | description |
9393
|----|-----|--------------|
94-
| 1. | **sqz compile --production** | Compile microservices |
94+
| 1. | **sqz compile --production** | Compile microservices for cloud deployments |
9595
| 2. | **sqz deploy --stage dev** | Deploy your app into the cloud provider<br>*Note*: initial deployments can take longer <= **40 mins** |
9696

9797

docs/book.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
"author": "Nick Chisiu",
33
"gitbook": "3.x.x",
44
"plugins": [
5+
"edit-link"
56
],
7+
"pluginsConfig": {
8+
"edit-link": {
9+
"base": "https://github.com/SqueezerIO/squeezer/edit/master/docs",
10+
"label": "Edit On GitHub"
11+
}
12+
},
613
"title": "Squuezer.IO Framework Documentation"
714
}

docs/cli/create.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212

1313
Options:
1414

15-
--project / -p Project's name (required)
15+
--project / -p Project's name (required)
1616

17-
--email / -e Project's owner email address (required)
17+
--email / -e Project's owner email address (required)
1818

19-
--template / -t Project's template , get available templates : sqz templates (required)
19+
--template / -t Project's template , get available templates : sqz templates (required)
20+
21+
--noChecksums / -n Disable microservices checksum, this will make the deployment sequence considerably slower (optional)
2022

2123

2224
Examples:
2325

2426
$ sqz create --name my-first-project --template aws-api-nodejs
27+
$ sqz create --name my-first-project --template aws-api-nodejs --noChecksum true

docs/common.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ Return CLI params
128128

129129
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
130130

131-
## Settings
132-
133-
Class representing Squeezer microservices clouds information
134-
135-
##
136-
137-
Returns clouds information data
138-
139-
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
140-
141131
## Command
142132

143133
Class for running spawning commands

docs/development/command_hooks.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@ directly from your project's directory stored in `PROJECT_DIR/lib/hooks/commands
55
separating your project functionality as much as possible, and use Squeezer framework only as a trigger .
66

77
```
8-
PROJECT_DIR/lib/hooks/commands/
9-
├── deploy.compile.yml - compiles source code before a cloud deployment
10-
├── project.install.yml - installs projects dependencies on project creation or project install command
11-
├── run.compile.yml - compiles source code before running a function
12-
├── run.execute.yml - executes your desired function
13-
├── serve.execute.yml - commands to run in order to serve/watch your project
14-
├── test.compile.yml - compiles source code before running tests
15-
├── test.execute.yml - executes tests
16-
└── test.prepare.yml - prepare your project before compiling tests
8+
PROJECT_DIR/lib/hooks/
9+
└── commands
10+
├── compile
11+
│   ├── development
12+
│   │   └── microservice.yml - compile microservices for local development
13+
│   └── production
14+
│   └── microservice.yml - compile microservices for cloud deployments
15+
├── install
16+
│   ├── microservice.yml - install packages required for each microservice
17+
│   └── project.yml - install project required packages
18+
├── run
19+
│   └── execute.function.yml - run a function locally
20+
├── test
21+
│   └── execute.yml - run integration tests for a microservice
22+
└── update
23+
├── microservice.yml - update packages for each microservice
24+
└── project.yml - update project packages
1725
```
261 KB
Loading

docs/gitbook/js/framework.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
window.frameworkVersion = '1.1.12';
3-
window.frameworkVersionReleaseDate = '2017-05-12';
2+
window.frameworkVersion = '1.1.14';
3+
window.frameworkVersionReleaseDate = '2017-07-07';

lib/plugins/aws/lib/compile/lib/cloudformation/microservice/lib/events/apiGateway/index.js

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const _ = require('lodash');
44
const ApiGatewayMainStack = require('../../../../main/apiGateway');
5-
const Outputs = require('../../outputs');
5+
const Outputs = require('../../outputs');
66

77
/**
88
* Class that manages the API Gateway event
@@ -19,6 +19,8 @@ class awsCompileApiGateway {
1919

2020
event.identifier = `${_.upperFirst(event.method)}` +
2121
`${_.upperFirst(_.camelCase(event.path))}`;
22+
event.corsIdentifier = 'Options' +
23+
`${_.upperFirst(_.camelCase(event.path))}`;
2224
event.shortIdentifier = `${_.upperFirst(_.camelCase(event.path))}`;
2325

2426
apiGatewayMainStack.addPathParts(event, lambdaFunction);
@@ -48,6 +50,10 @@ class awsCompileApiGateway {
4850
resourceParentId = apiGatewayMainStack.getResourceIdentifier(event.path, pathPartsLen - 1);
4951
}
5052

53+
// console.log(event.identifier);
54+
// console.log(event);
55+
// console.log(this.sqz.vars.env);
56+
// process.exit(0);
5157

5258
this.template.Resources[`${event.identifier}Method`] = {
5359
Type : 'AWS::ApiGateway::Method',
@@ -86,6 +92,64 @@ class awsCompileApiGateway {
8692
}
8793
};
8894

95+
if (this.sqz.vars.env.CORS) {
96+
this.template.Resources[`${event.corsIdentifier}Method`] = {
97+
Type : 'AWS::ApiGateway::Method',
98+
Properties : {
99+
AuthorizationType : 'NONE',
100+
HttpMethod : 'OPTIONS',
101+
Integration : {
102+
Type : 'MOCK',
103+
IntegrationResponses : [
104+
{
105+
ResponseParameters : {
106+
'method.response.header.Access-Control-Allow-Origin' : "'*'",
107+
'method.response.header.Access-Control-Allow-Headers' : "'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers'",
108+
'method.response.header.Access-Control-Allow-Methods' : "'*'"
109+
},
110+
ResponseTemplates : {
111+
'application/json' : ''
112+
},
113+
StatusCode : 200
114+
}
115+
],
116+
PassthroughBehavior : 'WHEN_NO_TEMPLATES',
117+
RequestTemplates : {
118+
'application/json' : '{"statusCode": 200}'
119+
}
120+
},
121+
// Responses : {
122+
// default : {
123+
// statusCode : 200,
124+
// headers : {
125+
// 'Access-Control-Allow-Headers' : '*',
126+
// 'Access-Control-Allow-Methods' : '*',
127+
// 'Access-Control-Allow-Origin' : '*'
128+
// }
129+
// }
130+
// },
131+
132+
MethodResponses : [{
133+
StatusCode : 200,
134+
ResponseModels : {
135+
'application/json' : 'Empty'
136+
},
137+
ResponseParameters : {
138+
'method.response.header.Access-Control-Allow-Headers' : true,
139+
'method.response.header.Access-Control-Allow-Methods' : true,
140+
'method.response.header.Access-Control-Allow-Origin' : true
141+
}
142+
}],
143+
ResourceId : {
144+
Ref : resourceParentId
145+
},
146+
RestApiId : {
147+
Ref : 'ApiGatewayRestApiId'
148+
}
149+
}
150+
};
151+
}
152+
89153
this.template.Parameters.ApiGatewayRestApiId = {
90154
Type : 'String'
91155
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "squeezer-cli",
3-
"version": "1.1.13",
3+
"version": "1.1.14",
44
"preferGlobal": true,
55
"description": "Event-driven APIs & Web apps on microservices, serverless ! Squeezer is a framework designed to help developers to get a better architecture on serverless zero-administration compute platforms with code that runs into [microservices](https://en.wikipedia.org/wiki/Microservices) clouds like [AWS Lambda](https://aws.amazon.com/documentation/lambda/) , [Azure Functions](https://azure.microsoft.com/en-us/services/functions/) , [Google Cloud Functions](https://cloud.google.com/functions/docs/) and [IBM OpenWhisk](https://developer.ibm.com/openwhisk/) .",
66
"homepage": "https://squeezer.io/",

0 commit comments

Comments
 (0)