How to compute Shapiro-Wilk test power? I test normality of 12 residuals that are obtained from resid(lm(...)) command via shapiro.test. Thus I know variance, mean, median etc.
The test don't reject the normality hypothesis. Hence I ask: "what is the power of the test?". Obviously I provide very little data therefore the power is very low. But how low precisely/ approximately?
For some other tests such as t-test there are plenty of online tools or the R function power.t.test. What function/tool should I use in order to compute the power for Shapiro-Wilk test?
 A: There is no straightforward way, unless you are make an assumption about the way in which your data is non-normal.
When you do a power calculation you start by assuming an alternate hypothesis to be true instead of the null hypothesis. With the two-group t-test you might want to test against "no effect" and assume a real effect size of 0.5. 
Now given the assumed effect size you also know the sampling distribution of your t-statistic and therefore how likely it is that it will fall into the reject region.
However, when testing normality the alternate hypothesis is that your variable is not normally distributed. This is not enough to make a power calculation possible. Obviously there is an underlying statistic, but assuming "not normal" is not enough to determine the sampling distribution.
A: 
Thus I know variance, mean, median etc.

Well the mean of residuals is 0, but you only have sample variance, sample median, etc.
In addition, residuals are not independent, so the assumptions of the Shapiro-Wilk test are violated; with only 12 observations, the error df of the regression is even lower (10 or fewer, presumably); this probably shouldn't be ignored unless you account for the effect of it.

Hence I ask: "what is the power of the test?".

Against what alternative, exactly?

For some other tests such as t-test there are plenty of online tools or the R function power.t.test. 

Yes, to which you must supply enough information to identify a precise alternative in order to get the power.

What function/tool should I use in order to compute the power for Shapiro-Wilk test?

You could use simulation, once you specify your alternative. Simulation would also let you take account of the dependence in your residuals.
For testing the distribution of ordinary data, see discussion of an example here
In that answer, results from a sequence of increasingly skew alternatives (gamma distributed) are used to obtain a power curve. Different alternatives would produce other values of power.
In your case you need to simulate the (zero-mean) errors, fit the regression and run the test on the residuals (you can fit the regression directly to the errors themselves, the residuals will be the same as if you constructed simulated data from the model).

However, I don't think it makes sense to use a formal hypothesis test in the first place. 
See the second half of this answer for some discussion of why. More details in the later part of this answer.
